Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
If I created $*OUT as an object, then yes, I would prefer to call the method on it. That's fair enough. You can of course do it that way. However some people do like the indirect syntax. I'm not such a person myself, but I can understand those who do like it. It can make slotting objects into a more procedural style of coding easier. I don't want to have to remember that I need a colon after it an object reference just because the Perl6 parser needs it to disambiguate between a multimethod and a multisub. Isn't it the difference between a subroutine call and a method call, rather than multimethod vs. multisub - the colon is just an indicator that the method (multi or otherwise) is being called in an indirect style? I admit I have only skimmed A12 so I may be getting the wrong end of the stick. Personally, I always felt that print() (and friends) has a difficult syntax to work with, given that it is different than every other other CORE function. But it's not just print. Is close $fh a subroutine call or a method call? I think that forcing the dot syntax for method invocation everywhere would result in something unperlish. Frankly, if that syntax is important enough to you, you could just do something like (in Perl5 syntax): Yes you could, but why should you if it can be well supported by the core? The indirect calling style has many problems in Perl 5, but in Perl 6 we have Class objects and an explicit colon syntax to disambiguate the nasty cases - so I don't really see the problem? In reply to Re^3: Get rid of the Indirect Syntax, please!
by adrianh
|
|