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' > or die "Can't open foobar: $!"; > > An implicit semicolon would cause it to croak there
No, that case would not cause the inclusion of an implicit semicolon. I certainly should have discussed such cases. But I have covered them in the blanket statement "C) and other cases that would also cause the parsing to return an error" because I am confident that the parser can handle them. What I said: My proposition could then be expressed informally: Newline is interpred as statement terminator when it makes sense. It does not when : A) in the middle of an expression when an operand is expected B) within a parenthesised expression C) and other cases that would also cause the parsing to return an error > > Also, s/or/$(any <<if unless for while when ...>>)/ > > 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 it. I am certainly confident that in perl6, everyone will be able to bake his own grammar. I am also confident that the grammar will be good enough that we will not have to do it in the general case > > Luke -- stef