C++'s version of this is more verbose but still sometimes worth it: make the caller instantiate the struct and initialise it as separate statements:
FooParams fooParams; // Gives sensible defaults to all members
fooParams.x = 1;
fooParams.y = "xyz";
foo(fooParams);
It doesn't work so well if you want to move construct things because you need to move at least twice: once when moving the value into the member, then you need to move the whole struct to the function argument `foo(std::move(fooParams))`. If you want it to copy something but avoid unnecessary copying then it's even more annoying because you need to move to the function argument still which looks odd when your goal is to copy overall.I always thought Amiga's "tag list" concept was really nice. You easily could extend the API w/o breaking the ABI, which was essential for its shared library concept. And it essentially gave you named arguments too.
I both love & hate this. I would genuinely consider using it in my own projects, and also I would be very pissed off if I encountered it in someone else's project. Brilliant.
It's fun watching people rediscover this every so often. If you like this sort of thing, go check out creating generator functions using a switch embedded throughout your function. You can wrap it in macros to end up with a nice yield keyword emulation.
I proposed something like this ~20 years ago in the context of GSS-API, where there are several functions with lots of arguments but where most arguments have reasonable defaults, so one could use named arguments for all the values that one must give and not mention the others that get default values. But I wasn't serious about it.