Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I'm generally excited about Perl 6 and what it will be able to do, but I do have one concern. I understand and appreciate TIMTOWTDI because it means I can attack the same problem from different directions which is good. But why so many different ways to pass named parameters to subroutines? Maybe I'm missing something and should go back and read the synopsis (I admit it has been some time) but why so many different syntaxes for the same thing? You're not solving the problem in a different way, you're just u
    • There's only really two syntxes: the fat arrow and the colon pair. I think that everyone is familiar with fat arrow so it's good to keep that, but it's not so easily extensible as colon pair to do some of the common special cases. Like, if you have a variable with the same name as the named parameter you want to pass it as, or if you just want to pass a true or false value. For example, when opening a file you can write :r to mean "read access" and it's as if you'd done r => 1, but neater. It would appear that Perl 6 will make quite heavy use of named parameters, so it's just the "common case should have a convenient short representation" thingy, I guess.