On Sat, Feb 19, 2005 at 12:44:49AM +0800, Autrijus Tang wrote:
: On Fri, Feb 18, 2005 at 08:26:26AM -0800, Larry Wall wrote:
: > So I think your initial solution is actually the right one from the
: > viewpoint of the Perl programmer.  If we need to tweak something,
: > it's perhaps to document the fact that *$x is required to match an argument,
: > while [EMAIL PROTECTED] isn't required to match any arguments at all.  So 
if you
: > had
: > 
: >     multi sub quicksort ( ) { () }
: >     multi sub quicksort ( [EMAIL PROTECTED] ) {
: > 
: > then when dispatching 0 arguments you actually have an ambiguity that
: > either has to be illegal or solved by ordered matching.
: 
: In pugs, currently it's ordered by local vs global, then by subtyping
: distance of invocants, then finally by then finally by the order of
: creation of CODE objects.  That's just a working heuristics, though.

Well, practically speaking, I think we have to resolve ties in favor
of an explicit default method, or die of ambiguity.  The creation
order of CODE objects is not reliable once you get out of the current
module, and even within a module can be unclear to the programmer once
people start flinging various compile-time blocks and evals around.

Larry

Reply via email to