in reply to Re: What's wrong with Perl 6?
in thread What's wrong with Perl 6?
However, I have some hope that this thread will have sufficient cultural leverage to make a difference, so I'm responding here. On your particular points:
for =$fh - that just looks string. I think while(<$fh>) is too strong of idiom to breakBrackets are in extremely short supply in ASCII, and the angle brackets were rather wasted on a single operator. Plus we really needed to do something about the strange autoquoting rules in subscripts that result in far too many FAQs. Stealing angles for both qw// and literal subscripts solved those problems, but it meant that we needed something else to iterate iterators. And unary = is the best we've come up with so far, given all the other demands on the character set. It has some visual mnemonic value in that it looks kinda like two lines from a file. But yes, it's a little strange.
~ ~ for string concatsWe needed something for that operator, and dot was no longer going to be available. We can't use juxtaposition like awk because that screws up expectations of terms vs operators, a fundamental contextual idea that carries through all the way from Perl 1 to Perl 6. We originally specced _ for it, but it didn't work well next to identifiers, and we wanted to reserve the underscore identifier for other potential uses, so we settled on ~ because it looks like a bit of string, and because the bitwise uses of tilde were going away in favor of a de-Huffmanized but more regular set of bit operators, so tilde was available.
??!! replacing ? :This is another case where some very important keys on the keyboard are locked up in not-so-very important operator, so we decided to de-Huffmanize and rationalize them. (The use of a bare colon was particularly difficult because there were so many other proposed uses for colon that we were trying to accomodate.)
The character doubling fits in culturally with the other short-circuiting forms such as && and ||. At one point the else was indicated by a double colon, but that turned out to be visually ambiguous with package name delimiters, plus we have a fairly consistent usage of ? to mean true and ! to mean false through the rest of the language.
Anyway, you undoubtedly like the current Perl 5 idioms for the same reasons that I liked them originally. :-) I would like to believe that you'll end up liking the Perl 6 idioms too, once you get used to them.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: What's wrong with Perl 6?
by nferraz (Monk) on May 14, 2007 at 09:56 UTC | |
Re^3: What's wrong with Perl 6?
by blazar (Canon) on May 14, 2007 at 21:18 UTC |