在 Sep 4, 2006 2:11 AM 時,Gaal Yahas 寫到:

Unless I'm mistaken, this doesn't cast back to subroutine signature land
very well:

      sub f1 (Dog ($fido, $spot))   { ... }
      sub f2 (Dog $ ($fido, $spot)) { ... }
      sub f3 (Dog :($fido, $spot))  { ... }


Unless Audrey's latest S03 patch pertains here as well, and Dog
distributes; in that case it would be as if the programmer had written

      sub f1 ([Dog $fido, Dog $spot])   { ... }

Yes, except there's no [] there; it's two positional parameters.

as described in the preceding section, "Unpacking array parameters". If
this is *not* the case, then f1 is not ambiguous!

TimToady++ just confirmed on IRC that it is indeed the case.

Please clarify, so I can clean up the confusing paragraph and introduce
the optionality of the colon less jarringly.

Woot! :-)


Reply via email to