On 5/20/05, Autrijus Tang <[EMAIL PROTECTED]> wrote: > So I'm finally starting to implement multi-level invocants in MMDs. > I'd like to sanity check some cases first, though.
Dewarnocking time. > Are these two assumed to be identical? > > multi sub foo ($x, $y) > multi sub foo ($x, $y : ) > > But these two are _not_ identical? > > multi sub foo ($x : $y : $z) > multi sub foo ($x : $y : $z : ) Right. > Is multiple colons usable in invocation? If yes, is these two > assumed to be identical? > > $a.foo($b : $c); > foo($a : $b : $c); I believe they are. I'm not really sure what the difference between the latter of those and: foo($a, $b, $c); is. > S12 says all the following cases "come out to the same thing": > > $handle.close # 1 > close($handle) # 2 > close $handle: # 3 > close $handle # 4 > > Does it mean that during invocation, when there is no colons and > no dots, an implicit colon is added at the end, making all arguments > same-level invocants and subject to MMD? That is, these are identical: > > foo($a, $b) > foo($a, $b : ) > > But these two are _not_: > > foo($a : $b : $c) > foo($a : $b : $c : ) Hmm, I'm doubting that reflecting how many invocants you have on the caller side is a good idea. It seems awfully brittle in the face of reimplementation. Luke