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
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Syntax (Score:1)
He also complains about having to change the prefix on the array to access the individual element. Once you "get" it, it really seems like the right way to do it but it gets ugly quickly once references are involved. I am willing to give up context-based sigils for simpler reference-handling in Perl 6.
Reply to This
Re: (Score:1)
Honestly, I don't see a problem with the references. You can always write $foo->[3] to dereference the array. And I really don't agree that references and non-references should be interchangable. Since non-refs and refs behave differently, you _have_ to differentiate them. Otherwise this would just scream "action at a distance" to me.
I can however, understand why non-Perl people have problems with the changing sigils. Because they aren't used to it. Personally, I like it, but I can see why it was decid
Ordinary morality is for ordinary people. -- Aleister Crowley
Re: (Score:1)
Re: (Score:1)
Exactly :) That's why I bow before those people who try to transform those silly discussions into "I like $x about $y" and "I hate $x about $y" thoughts. Those are the rants and raves everybody can learn something from. Especially if they are written by people who actually work with that language of course :)
Ordinary morality is for ordinary people. -- Aleister Crowley
Dereferencing (was: Syntax) (Score:1)
Re: (Score:1)
What’s really annoying is that there’s not even any reason for the prototype on
keys(nor, really, on most other functions). Even ifkeys $foowill blow up at compile time,keys %$foowon’t – but that doesn’t mean the reference is a hash ref. The only reason forkeysto have a prototype is because of how the parser works; a mere artefact.Context-sensitive sigils worked for Perl 4 because it doesn’t have references; in Perl 5 they are a pointless wart.
Re: (Score:1)
I like that you have to specify that you're passing a reference. I like that by default, perl flattens arrays into the argument list. I seem to do that more often than passing in references. When I was playing with Ruby, a gotcha for me was that you had to add extra syntax to flatten the array in an argument list. So what are these people complaining about? You gotta have it one way or the other, I like the perl way, but I could adjust to t
Re: (Score:1)
Re: (Score:1)