in reply to Re: Re: Re: Re^4: Perl6 syntax being too much complex? How we will teach and read that?!
in thread Perl6 syntax being too much complex? How we will teach and read that?!
The parens are not necessary for an indirect object, which your colon forces it to be. Chances are it'll even work without the colon, because the syntactic function of the colon is to separate the indirect invocant from its arguments, and if there are no arguments, it's not ambiguous. It's only with arguments that the colon becomes obligatory.
Basically, the dispatch rules are defined such that, for argumentless methods, it doesn't matter whether you call them as methods or subroutines--you end up at the same place. So you don't have to care whether
is defined as a global, multi-dispatched subroutine or as a normal method on filehandles.close $handle;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Re^4: Perl6 syntax being too much complex? How we will teach and read that?!
by BrowserUk (Patriarch) on Mar 25, 2004 at 18:21 UTC | |
by TimToady (Parson) on Mar 25, 2004 at 19:13 UTC |