We don't bite newbies here... much | |
PerlMonks |
Re^2: Porting (old) code to something elseby Tux (Canon) |
on Feb 16, 2015 at 16:52 UTC ( [id://1116897]=note: print w/replies, xml ) | Need Help?? |
Of course I can :) In perl6 the opening paren (() of a function cannot be separated from the function by whitespace:
For reasons I explain in my style guide MY preference is C. Perl6 only supports A and B. This is only an example. The syntax rules go deeper than that, causing the dot (.) to be special too, so that
chaining as allowed in perl5 (break to a newline wherever you like), would NOT translate to
This is bad (IMHO), see:
This is because a leading dot (after whitespace) will see the next word as method on the current topic ($_) instead of as a method on the previvious "thing". As the previous line has no trailing semi-colon, I would prefer the default to be different. The perl6 core dev people state it is possible with a backslash:
But do you want your code to look ugly like that? I do not! Enjoy, Have FUN! H.Merijn
In Section
Meditations
|
|