Well, actually I tried to reduce complexity ;-)
It basically started with the observation that we may not need another way to introduce variadic arguments. We already have one and we could reuse that for the first form of dynamicCall.
So my idea is not motivated by a new use-case, it just tries to reuse existing mechanisms.
In order to call Python functions with keywords, we need something like variadic arguments, so I tried to find an approach which is as close to the existing syntax as possible.
Such a decomposition would allow:
- callable objects, with a function signature and type checking just like normal functions;
- functions with variadic keyword arguments.
In order to bridge to Python functions, both of these would have to be combined.
The advantage would of course be that these features could be used independently. But you are right that without a concrete use-case, it’s difficult to rate the usefulness of these new features. I’ll have to think about that some more.
Others have expressed the desire to have static callable objects; it would really be interesting to see some concrete examples where it would be useful.