Re: RFC 167 (v2) Simplify Cdo BLOCK Syntax
Perl6 RFC Librarian [EMAIL PROTECTED] writes: =head1 DESCRIPTION One of the most common mistakes I make is forgetting a C; after Cdo BLOCK, probably because I'm thinking ``if'' and an if doesn't require a C: after it's closing C}. I'll type, for example, $cond and do { # statements } Tom's already addressed the case where you drop the 'do' so, what happens if you want: $cond and do {...} or die; Doesn't dropping the requirement for a terminating ';' make life harder for the parser? -- Piers
Re: RFC 167 (v2) Simplify Cdo BLOCK Syntax
Doesn't dropping the requirement for a terminating ';' make life harder for the parser? It doesn't seem like that's a criterion people have been applying to any of this. Unfortunately. --tom
Re: RFC 167 (v2) Simplify Cdo BLOCK Syntax
Simpify syntax of Cdo BLOCK by deleting Cdo before the block and C; after it. You can't do that. They do different things. $n = do { my $sum = 0; for $i (@array) { $sum += $i } $sum; }; versus $rec = { FOO = 1.4, BAR = "red", }; --tom