Interestingly, I had already written almost exactly the same thing
into my version of S06, but I've been holding off on checking it in
while I mull over Luke's theory theory.  Regardless of the actual
syntax we end up with, I think everyone can assume that the compiler
will be able to determine at compile time which pairs are intended
to be named arguments and which ones positional parameters, and pass
them as separate entities through whatever structure supplies all the
arguments to a call so that the caller doesn't have to worry about
making the distinction based on type.

It still has to figure out how to reconcile the named arguments
with the positional parameters, of course, unless someone has
made sufficient representation to the compiler that all calls to
a particular short name have particular named parameters that are
guaranteed to be in the same position everywhere, in which case the
compiler is allowed to simply translate them to positionals on the
call end.

Perhaps it would be useful to allow a stubbed multi to declare the
required names of positional parameters in some scope or other.  This
might be generalized to a translation service for calls outside the
scope, where the current scope could even be the current language
as a whole.  That might alleviate cultural differences if one language
always uses $left and $right where another uses x and y, for instance.

Of course, I haven't eaten breakfast yet, so maybe that's impossible.


Reply via email to