Exegesis 3 Released (Perl 6 Examples)
chromatic writes "On the heels of Larry's most recent revelation, the mad scientist of Perl (Damian Conway) has followed up with Exegesis 3. His article gives working Perl 6 code examples of Larry's design decisions." Lots of good stuff in here.
Some of this new stuff seems to be seriously blurring the difference between language and library.
Of course it's cool to write something like @costs, but why must be an operator? It seems to me it would work just as well as an ordinary procedure.
I'm wondering if they are thinking about constructs to define new syntax at runtime. In Scheme for example most of the syntactic forms are defined in the library using define-syntax .
I do love the hell out of perl, but I sure hope I can "use English 'operators';" for things like the hyper-operators. 'course, maybe 'use English' is deprecated ... can't wait for 'use Chinese', imagine what perl would look like then...
I would much rather see "@diffs = @set1 ^- @set2" expressed as a list comprehension, say @diffs = (each $x - $y suchthat $x in @set1, $y in @set2); (assuming I have said "english operators" on, otherwise I would imagine at least the 'suchthat' operator would be some punctuation char). It's a bit contrived for something as simple as subtracting every member of a couple lists, but list comprehension is beautiful stuff when combined with lazy evaluation in languages like Haskell.
Oh, and Perl6 is going to have an 'in' operator, right?
I've finally had it: until slashdot gets article moderation, I am not coming back.