On Thu, 2004-05-06 at 02:36, Dov Wasserman wrote:
> To distinguish these two cases, what if we used the := binding operator to
> bind an argument to a named parameter:
> 
> logError($err_msg, prio := 3);

but how would this look like to a subroutine that is not defined to
accept a named parameter called prio? eg. if you decide to reimplement
logError to be just:

sub logError { # implicit ([EMAIL PROTECTED])
    # ...
}

using a Pair, you still have someting (a Pair object) that you can
inspect, and eventually decide wether to treat as a named argument or
not. but when you use "prio := 3", what do the subroutine get? only "3"
in that position? or a Pair anyway? or it doesn't get the 3 at all?

cheers,
Aldo


Reply via email to