why ; ?

Michael Neumann mneumann at ntecs.de
Tue May 6 05:41:36 PDT 2008


Tom wrote:
 > Tomasz Sowinski escribió:
 >> Robert Fraser Wrote:
 >>
 >>> So the end of a statement would be marked by a newline character a la
 >>> Python?
 >>
 >> yes
 >>
 >>> 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?
 >>
 >
 > Please no!

It is very successful in Ruby! But Ruby is a very different language.
Ruby allows you to separate statements with ";" in one line. And it
recognises statements that cross a line boundary like shown below:

   a +
   b
   ==> a + b

   a
   + b
   ==> a; +b (probably not what you want!)

One problem is clearly (as Walter said) that reporting syntax errors can
become hard, or very unprecise. The latter is the case in Ruby.

Regards,

   Michael



More information about the Digitalmars-d mailing list