Re: newline as statement terminator

2003-02-06 Thread Todd Olson
At 01:57 +0100 2003/02/04, 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. > IMO this would

Re: newline as statement terminator

2003-02-06 Thread John Williams
I'll just weigh in with my vote against this. On Tue, 4 Feb 2003, 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

Re: newline as statement terminator

2003-02-06 Thread Andy Wardley
Allison Randal wrote: > It's a balance, like everything else in design. use Yin::Yang; s/design/life/g; A

Re: newline as statement terminator

2003-02-05 Thread Allison Randal
Nicholas Clark wrote: > 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. It isn't and never will be. We're openly friendly to all languages. But Perl is also quite diff

Re: newline as statement terminator

2003-02-05 Thread Nicholas Clark
arenthesised 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 termina

Re: newline as statement terminator

2003-02-03 Thread Deborah Ariel Pickett
> print "---" # must read the next line to > # figure out if new line is statement terminator or not >if $condition"; Yes, let's expand that example, and assume the "semicolons optional where obvious" proposal. sub foo { print "abcde" if $condition { print "fghij" } }

Re: newline as statement terminator

2003-02-03 Thread attriel
>> I don't mean to be abrupt here, especially seeing as how this list has >> been so patient with some of my ideas but... PLEASE NO. The rules you >> suggest for keeping track of when a semicolon is required sound more >> confusing than the simple rule of "end of statement, put semicolon". > > As

Re: newline as statement terminator

2003-02-03 Thread Stéphane Payrard
On Mon, Feb 03, 2003 at 08:19:29PM -0500, Miko O'Sullivan wrote: > On Tue, 4 Feb 2003, [iso-8859-1] 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 >

Re: newline as statement terminator

2003-02-03 Thread Allison Randal
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. ;) Allison

Re: newline as statement terminator

2003-02-03 Thread Stéphane Payrard
On Mon, Feb 03, 2003 at 06:11:23PM -0700, Luke Palmer wrote: [snip] > > See, this is the main, unPerlish thing you're doing. You're enforcing > particular styles upon people, something Perl is proud of *not* doing. > > Let's not forget the often occurence of: > > $fh = open 'foobar' >

Re: newline as statement terminator

2003-02-03 Thread Deborah Ariel Pickett
> It would be trivial with a grammar munge to implement this (heck, I > did it with a source filter in Perl 5). Surely CPAN6 (6PAN/CP6AN/??) > will come out with one of these right off the bat, so you could do: > > use Grammar::ImplicitSemicolon; > > Or something like that, and be done with

Re: newline as statement terminator

2003-02-03 Thread Miko O'Sullivan
On Tue, 4 Feb 2003, [iso-8859-1] 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. I don

Re: newline as statement terminator

2003-02-03 Thread Stéphane Payrard
> > Multiline atomic statements just have to be broken at the right > place to avoid to break them: Sorry about my English. Let me reformulate. When folding an atomic statement, it becomes two statements or its meaning is unchanged depending if an operand is expected or not at the position of th

Re: newline as statement terminator

2003-02-03 Thread Luke Palmer
> _and_ b) we are not in the middle of a parenthesised expression. Can you say "Ruby"? No, I think a semicolon should still be required to seperate statements. > Accessorily, it would also help people to switch back and forth > between language that use newline as statement te

newline as statement terminator

2003-02-03 Thread Stéphane Payrard
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