in reply to Re: Re^7: Get rid of the Indirect Syntax, please!
in thread On the Improvement of Exegesis 12
I can only say "Parentheses should be disambiguating it".
Well, parentheses can't always disambiguate, because you can have multiple invocants. For example:
(I'm not 100% sure on the syntax.) Multiple dispatch decides which method to call based on the types of all invocants. Usually you only have one, but you can have more than one if you want more than one object to be considered when the dispatcher is deciding which method to call. In those cases, you really need the indirect syntax.some_method($obj1, $obj2:); some_method($obj1: $obj2);
Update: This is wrong. I got mixed up between declaration and call. You can declare a method to have more than one argument involved in the dispatch decision, but you can't (per Larry below) call it that way.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re11: Get rid of the Indirect Syntax, please!
by dragonchild (Archbishop) on Apr 19, 2004 at 16:58 UTC | |
by TimToady (Parson) on Apr 19, 2004 at 17:43 UTC | |
by dragonchild (Archbishop) on Apr 19, 2004 at 18:25 UTC |
In Section
Meditations