Advocating Perl 6
As the time nears, I figured some buzz was in order, and to help with that, I'm Buzzing about Perl 6. If you would like to follow me / reshare / comment, you can go here: http://www.google.com/profiles/AaronJSherman#buzz My current goal is to post a short snippet of Perl 6 code with an equally brief explanation every day. We'll see how long I can keep it up. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs
r30973 -[S02] missing var noticed by isBEKaml++
Author: lwall Date: 2010-05-30 06:27:15 +0200 (Sun, 30 May 2010) New Revision: 30973 Modified: docs/Perl6/Spec/S02-bits.pod Log: [S02] missing var noticed by isBEKaml++ Modified: docs/Perl6/Spec/S02-bits.pod === --- docs/Perl6/Spec/S02-bits.pod2010-05-29 23:27:04 UTC (rev 30972) +++ docs/Perl6/Spec/S02-bits.pod2010-05-30 04:27:15 UTC (rev 30973) @@ -626,7 +626,7 @@ Since Cnum can support the value CNaN but not the general concept of undefinedness, you can coerce an undefined value like this: -my num = computation() // NaN; +my num $n = computation() // NaN; Variables of non-native types start out containing an undefined value unless explicitly initialized to a defined value.
r30974 -[S05] Describe alternation left-factoring in rules, long implemented by gimme5
Author: sorear Date: 2010-05-30 07:07:05 +0200 (Sun, 30 May 2010) New Revision: 30974 Modified: docs/Perl6/Spec/S05-regex.pod Log: [S05] Describe alternation left-factoring in rules, long implemented by gimme5 Modified: docs/Perl6/Spec/S05-regex.pod === --- docs/Perl6/Spec/S05-regex.pod 2010-05-30 04:27:15 UTC (rev 30973) +++ docs/Perl6/Spec/S05-regex.pod 2010-05-30 05:07:05 UTC (rev 30974) @@ -2471,6 +2471,13 @@ considers its longest token to be just the left square bracket, because the first thing the Cexpr rule will do is traverse optional whitespace. +As an exception to this, and in order to promote readability, a special +exception is made for alternations inside rules. If an alteration in a +rule, or any other context where C:sigspace is active, has whitespace +before a group of alternations, then any leading whitespace on the +alternatives is ignored. That is, Crule { [ a | b ] } is treated as +if it were Crule { [a |b ] }, and the LTM match begins with the first +non-sigspace atom. The initial token matcher must take into account case sensitivity (or any other canonicalization primitives) and do the right thing even