Uri Guttman said:
BM> Is there any real reason for that 'SINGLE' ?
BM> Note: by "real reason" I exclude reasons relating to aesthetics (the
BM> human-readability of code). The language syntax has no buisness
BM> arbitrarily preventing you nesting syntactical constucts for purely
BM> aesthetic reasons.
yes,
What are you saying "yes" to? Are you agreeing that it is wrong that
the language arbitrarily disallows nested modifiers or are you saying
yes, there is a real real reason for disallowing them.
larry said he won't do it in perl5 and in perl6.
But AFAIK his reasons wrt Perl5 were in the class I explicitly
excluded from the class "real reason".
BM> I am forever wanting to write:
BM> EXPR if COND for LIST;
and what about EXPR while <> for EXPR?
what is $_ set too?
Er, exactly the same as it would be in:
for ( EXPR ) {
while ( <> ) {
EXPR;
}
}
there are serious semantic and even syntactic issues with multiple
statement modifiers. search the perl6 language list for threads on that
(in the last month or two IIRC). larry covers some good reasons and he
says NO!
OK, I'm not a follower of the Perl6 discussions. But looking there
just now, as far as I can see all the "reasons" given are excuses to
justifty a decision that was taken on aesthetic grounds.
There are no real syntactic ambiguities, and those semantic issues
that exist with multiple modifiers apply equally when using block
syntax.
If Larry wants to put his foot down and say "no nested statement
modifiers because I think they are ugly" he can do so. But if his
only reason is his own aesthetics then people shouldn't pretend
otherwise. (I say "people" because I don't actually see any evidence
of Larry pretending otherwise).
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\