why ; ?

Nick Sabalausky a at a.a
Tue May 6 11:47:17 PDT 2008


"Tomasz Sowinski" <tomeksowi at gmail.com> wrote in message 
news:fvmgn8$s5d$1 at digitalmars.com...
> Robert Fraser Wrote:
>> I usually like to keep my lines under 80 characters long for
>> readability, and occasionally have long statements (especially if
>> there's a ternary operator in there somewhere), so my vote is "nay".
>
> Maybe a breakline symbol like in Ruby or VB for long statements?

I can fully appreciate the reasoning behind "optional semicolon" syntax. Ie, 
there's a one-to-one relationship between "line" and "statement" for most 
lines and statements, therefore if an extra symbol is going to be used it 
should be for the border case (multi-line statement) rather than the typical 
case (single-line statement). But, in my experience, I find that there's 
another practicality-related issue that ends up trumping that one:

I'm constantly readjusting statements back and forth between "all on one 
line" and "spanned over multiple lines" (for instance, "if" statements with 
lots of clauses, and functions calls/definitions with lots of arguments). 
Every time something changes, I rearrange to make it more readable, which 
often involves moving parts of a multi-line statement from one line to 
another, or changing a statement back and forth between single-line and 
multi-line. End-of-line symbols don't prevent me from doing that, but they 
do get in the way and make it a regular pain-in-the-ass. End of statement 
symbols, however, are very easy to get accustomed to, quickly become second 
nature, and never really get in the way. 





More information about the Digitalmars-d mailing list