>> 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 Luke Palmer said, in perl6, semicolon is a statement separator not a
> statement terminator. So there is no such simple rule in Perl but you
> are free to imposit it on yourself. Perl allows it but it does not
> requires it.

Er.  What is the difference between a "statement seperator" and a
"statement terminator" for the majority case?

Seperator means I can leave off the last one in a {} b/c there's no
following statement ... But is there any other place I can "optionalize"
the ; by calling it a seperator vs a terminator?

I like having ;'s at the end of my bits, b/c then I know where a line
ends.  When someone's pasting me bad (and I mean BAD) perl5 code, I like
having those ;'s there to tell me what ended where, since (The case i'm
thinking of offhand) was doing a print qq|| that printed out a BUNCH of
things and then ended with an if .. that ; was important b/c I kept
thinking hte if was part of the next line (it was on a seperate line,
making it even more fun)

Yes, this would make that program entirely not work, but I'm sure the new
version wouldn't be much prettier since there'd be no ;s at all

>> I like to break up my long statements in all sorts of arbitrary
>> places, and adding the worries of when a newline might be significant
>> puts a knot in my stomach just thinking about it (literally).
>
> I agree that be obliged to check the next line to see if the newline is
> or is not a statement terminator is not the nicest thing.

lookahead parsing is tolerable in a compiler, but in an interpreted/jit
environment, I'd HATE for my code to change meaning b/c i forgot a \n ...
esp if it's in generated code ... ewwww

> On the other hand, if the programmer is correctly indenting the program
> it should stand out that the next line is part of the courant statement.
>
>
>  print "-------"  # must read the next line to
>                   #  figure out if new line is statement terminator or
>    if $condition";
>
>
> Here indentation is a mere clue but has no syntactic meaning.

So, is the indentation required as a parser-hint (ewww, I hated mandatory
indents in fortran, and I can't see any good reason to bring them back;
stylistically I still think they're mandated, but not dictated by the
language) or is it just there to help people  ?

And why is there a "; there?  i presume the " is a typo, but since this
whole discussion is getting rid of the ;, I cna't see why it's there ...

Summary:  ;'s good, indentation necessary but not parser-graphically
dicatated :o

--attriel

(parsergraphically?)


Reply via email to