On Sat, Apr 12, 2008 at 04:58:57AM -0000, John M. Dlugosz wrote:
: In S06, a wrong word:
: 
: "Alternately, optional fields may be marked by supplying a default value. "
: should be parameters, not fields.
: 
: Now here is my question:
: Params are bound in declaration order, not call order, and may refer to 
previous parameters.  But what if a multi makes use of your intentional 
mechanism of having value constraints, namely the use of named subtypes.  You 
don't know if the parameter is suitable for the subtype until its value is 
known.  And the multis have their named parameters in opposite orders, or 
similar names with different contexts.  It's not supposed to process the 
argument list until after it decides with function to call.  But you also want 
a mechanism to distinguish alternatives based on values.  What gives?

What gives (in the sense of breaking) is the notion that you can do
multiple dispatch on randomly ordered arguments.  That's the main
reason we invented proto multis, so that the compiler can rearrange
supposedly randomly ordered arguments into positional slots so that
you can to multiple dispatch on them.  Other than that, we make no
promises about supporting multiple dispatch on named args other than by
excluding candidates that can't bind at all.

Larry

Reply via email to