I was thinking about this for a bit and it sort of feels like this is a convoluted path to get back to positional arguments. Like, Python introduced the idea of keyword-only arguments and this idea is trying to go back.
If I’m writing a lot of code that looks like func(variable=variable, other_variable=other_variable, ...)
then maybe my function signature has bad ergonomics and I should make it possible to write func(variable, other_variable, ...)
. Maybe I’ve converted too many things to be keyword-only, or I’ve ordered my arguments in a silly way (like, put uncommonly-specified arguments too early). Syntactic sugar covers up the mess a little but the code itself could be improved.
Just putting this idea out here as another perspective on the situation. I think it’s useful to consider how we find ourself in situations where sugar makes a big difference, and if there are ways to avoid needing it.