On Tue, Feb 04, 2003 at 01:57:00AM +0100, Stéphane Payrard wrote: > In the tradition of Perl concision, I would like newline to be a > statement terminator everywhere it can: that is when > a) the parser expects an operator > _and_ b) we are not in the middle of a parenthesised expression. > > Accessorily, it would also help people to switch back and forth > between language that use newline as statement terminator and perl6: > they will not be burn anymore when forgetting a semicolon. > > Semicolons are still allowed everywhere as statement terminator > because empty statements are. > > So, In the common case, oneliner atomic statements, the proposed rule > means: you can drop the ending semicolon. > > BTW: Atomic statement are statement composed of one expression only. > For composite multiline statements, see "About the b) rule" below. > > Multiline atomic statements just have to be broken at the right > place to avoid to break them: > > a + > b > > is equivalent to > > a + b > > But > > a > + b > > are two statements.
And $a = $something->{very}->[$complex] - $that('goes')->to(qw(the line end)) + and_then('wrapped_like_this'); is two statements? (and not even a "Useless use of a constant in a void context" warning) Although I use this all the time, grovelling round the perl5 source, I could only find this sort of idiom used in Match::BigInt's tests. And that was like this: plan tests => 669 + 16; # own tests On Mon, Feb 03, 2003 at 07:37:44PM -0600, Allison Randal wrote: > Miko O'Sullivan wrote: > > > > NOTE TO ALLISON RANDAL: in your face-to-face meetings next week, please > > make sure that "Larry Wall" isn't really Guido van Rossum with a fake > > mustache. > > Righto. No reptiles, only jewels and birds. And possibly the occasional > snark. ;) There's nothing wrong with stealing, er "borrowing" the good bits of reptiles though, is there?. I didn't think that perl was fussy about where it gets its inspiration from. And they shouldn't complain, as imitation is the sincerest form of flattery. On Tue, Feb 04, 2003 at 02:24:48PM +1100, Deborah Ariel Pickett wrote: > Personally, as a Perl programmer, I *like* semicolons. They are the > programming equivalent of the end-of-phrase markers you get in music to > tell your brain to take a breath. Hmm. So if some saboteur erases all end-of-phrase markers from the musical score you are reading, does that mean that after a while you turn blue and then fall over? :-) Nicholas Clark