John Porter wrote:
> > So in RFC 119, we have in-scope catch statements, dangling except
> > clauses, and dangling always clauses.
>
> I'll go on the record as saying that I am totally opposed to
> dangling "clauses" of any kind.
Now that's just the sort of Gibralter-like position that begs to be
(1) ignored because there is no stated justification
(2) ignored because it ignores the benefits to be had because of the
dangling syntax
(3) ignored because Perl 5 already contains precedent dangling clauses that
are unlikely to be removed
But after you cede me historical credit for intra-block catch statements, I
hate to ignore you, John. Do you care to make a comprehensive argument of
the pros of your position, all in one place? I'm not particularly
interested in searching the archives for tidbits of the position that might
be scattered far and wide, but if you gather the supporting arguments
together in a single posting, I'd be willing to be convinced, or to offer
my counter arguments, if unconvinced.
> In fact, I'd be happy if legacy constructs like 'continue'
> were made inscope (?) instead of dangling.
Does this position include "dangling" if, unless, while, until and foreach
as well? Or are those exempt from your position for other unstated
reasons?
With reference to "continue" in particular, it seems like either the
addition of an "always" statement or an "always" dangling clause, could
provide the same functionality as continue, allowing it to be deprecated
(or removed with help from p52p6). continue seems to be much more special
purpose in nature than the proposed dangling always clause.
I think
while ( cond ) { a } continue { b };
could probably be expressed as
while ( cond ) { a always b };
If a contains multiple statements, or if there is interesting variable
scoping, the exact equivalence might not be so easy to convert, but is
likely possible.
--
Glenn
=====
Even if you're on the right track,
you'll get run over if you just sit there.
-- Will Rogers