I admit that I've been a bit lukewarm on Perl 6. I've read the Apocalypses and the Exegeses but nothing had really made me think that Perl 6 was something I wanted to learn. I like Perl 5. I like it a lot. Perl 6 often seemed too different to be of interest to me.
But last night I saw Damian speak about it. And that somehow helped it all make much more sense than just reading articles had. I now feel excited about Perl 6. I want to be able to start playing with it today. And the best thing is that I can. There's now a cut-down Perl 6 compiler included with the latest versions of Parrot. I guess that's where I'll be spending my weekend then.
If you have any doubts about Perl 6, then please try to get to one of Damian's talks about it. I'm sure he'll change your mind.
p.s. I still don't like the "rationalisation" of the sigils tho'.
And I love properties on my variables. I'm going to have to start looking at Attribute::Handlers...
I don't care about the sigils though. They've always confused me so much in perl5 that I've never, ever been tempted to use a hash slice.
-Dom
Re:Perl 6
gnat on 2002-08-30T19:50:11
Yeah, but this is your standard reaction to everything, Pudge. OS X? Scary! Perl 6? Scary! You're just not a major rewrite kinda guy, and that's okay. You'll wait until Perl 6.1, before getting your toes wet.--Nat
Re:Perl 6
pudge on 2002-08-30T20:01:20
Maybe. In fairness, though, I am not against major rewrites. I was for the idea of Mac OS X, just not how it initially turned out. I wanted Mac OS on top of Uniux, and I got NeXT on top of Unix. Now it is becoming more and more like old Mac OS, so I am happier. I am not for much of what is in Perl 6 from the beginning, so it's less likely I'll bother in the future.
I saw Damian speak here in Portland, OR, and that was what finally convinced me that the new sigils are the way to go. I'm teaching Perl to a friend of mine right now and he's terribly confused about the difference between these two:
$foo = {};
%foo = ();
Mind you, I was trying to steer him away from references while he was first learning, but he's pretty ambituous and is really digging in. He thinks he's getting the hang of it, but I suspect that his mind is really going to get blown when he sees a hash slice.
@foo{ qw/ bar baz / };
So we have three different sigils that we can have at the beginning of a hash, but newer programmers are not expecting that. Oh, wait! What if I assign a hash via a typeglob? I guess we have a fourth sigil. Or I could have a constant return a hash and have no sigil, but that's getting silly, right? Personally, I'm not sure that it is. TIMTOWTDI is great, but this area keeps tripping people up.
Re:I like the sigils
gav on 2002-08-31T14:28:33
I've never been keen on a hashref slice:@{$hr}{qw/bar baz/};Re:I like the sigils
jdporter on 2002-09-05T17:25:46
I hate the new sigil system.
What I like about perl5's way of doing it is that the sigil is not part of the variable name, it's an indicator of the type of the expression. $h{x} is a scalar expression. In perl6, the sigil is simply part of the variable name, which means it really adds nothing -- zilch! -- for either the human or the compiler, other than to say (e.g.) "this is a hash variable". I'm sorry, but the compiler and I can both tell that $h{x} is referring to a hash variable.
The whole sigil thing should be dumped completely. Larry is such a huge proponent of "Huffman coding", yet he doesn't go for this obvious, big win. I would much rather indicate the type of my variables at declaration time. I think we've all been convinced of the usefulness of declarations; perl5 strongly encourages them, and perl6 will go that much further. So given that we'll be (very often) declaring our variables to be this class, have those properties, and that initial/default value, it seems like a no-brainer to add type to the declaration statement as well. </rant>
Or I could have a constant return a hash and have no sigil...
Um, I don't think so. It could return a hashref, or a list, but not an actual hash variable.
Of course, some changes are annoying. I'm not fully convinced about the new sigils, and I don't like how foreach is being dropped, but well... All in all, I think these points a price worth paying.
What's so bad now is waiting: I want Perl 6 now! Now! And when I was speaking to Larry at YAPC::Europe, he said that a "fully functioning Perl 5 equivalent is still a year away". So, we must do the one thing we can do to help: donate to the Perl Foundation.