On Tuesday 04 September 2001 12:27 am, Damian Conway wrote:
> C<try> and C<catch>
[ LABEL: ]
try { block }
[ [ catch [ ( expr ) ] { block } ] ... ]
?
>
> (C<finally> is not nearly so certain.)
>
> > Conditional Statement Modifiers
> >
> > 6. [ LABEL: ] expr if expr;
> > 7. [ LABEL: ] expr unless expr;
>
> I'm not at all sure modifiers will be stackable, as this grammar implies.
Er, parsing error. Are you saying I've got it right or wrong? (I'm
intending non-stackable.)
>
> > Iterative Block Constructs
> >
> > 20. [ LABEL: ] for[each] [ scalar ] ( list ) { block } # Note 4
>
> I am hoping that Larry will also give us:
>
> [ LABEL: ] for[each] (scalar, scalar ...) ( list ) { block }
>
> > Subroutine Code Blocks # Note 6
> >
> > 21. sub identifier [ ( prototype ) ] [ :properties ] { block }
> > 22. sub [ ( prototype ) ] { block } # Note 7
>
> Currently:
>
> 21. sub identifier [ ( prototype ) ] [ is properties ] { block }
> 22. sub [ ( prototype ) ] [ is properties] { block } [is properties]
>
> Though I would *much* prefer to see:
>
> 21. sub identifier [ ( prototype ) ] [ :traits ] { block }
> 22. sub [ ( prototype ) ] [ :traits] { block } [is properties]
Ah, traits is what I meant. But that's not final yet?
>
> > A statement consists of zero or more expressions, followed by an
> > optional modifier and its expression, and either a statement
> > terminator (';') or a block closure ('}' or EOF).
>
> Need to recast this in terms of statement separators and null statements.
Wouldn't a null statement be covered by a statement of 0 expressions?
>
> > A block consists of zero or more blocks and statements. A file is
> > considered a block, delimited by the file boundaries. Semantically,
> > I will define a block only in terms of its affect on scoping.
>
> <PEDANT>
> "its effect on scoping"
> (we probably don't care about its pyschological demeanor ;-)
> </PEDANT>
Thanks,
And while I'm at it, I have some questions for you! Would you *please*
consider reforming the 'when expr : { block }' clause as
when ( expr ) { block }
?
'if', 'unless', 'elsif', 'given', 'while', 'until', the looping 'for[each]',
and potentially the 'catch' clauses all use that form - 'keyword ( expr ) {
block }'. 'when' is the odd man out.
Secondly, do 'when' clauses have targettable labels?
given ( $a ) {
when /a/ : { foo($a); next BAR }
when /b/ : { ... }
BAR: when /c/ : { ... }
...
}
--
Bryan C. Warnock
[EMAIL PROTECTED]