Semicolons: mostly unnecessary?

Rainer Deyke rainerd at eldwood.com
Wed Oct 21 21:18:22 PDT 2009


Simen Kjaeraas wrote:
> On Thu, 22 Oct 2009 05:39:10 +0200, Rainer Deyke <rainerd at eldwood.com>
> wrote:
>> Trivial solution: use indentation.  If a line is more deeply indented
>> than the previous line, it's a continuation of the previous statement.
> 
> All spaces, I presume? :p

Tabs wouldn't be a problem so long as they are used consistently (one
tab per indentation level).  Given two whitespace sequences A and B,
there are four possibilities:
  - They are identical, so they represent the same indentation.
  - A is a prefix of B, so B represents the deeper indentation.
  - B is a prefix of A, so A represents the deeper indentation.
  - Neither is a prefix of the other, which would be a syntax error.


-- 
Rainer Deyke - rainerd at eldwood.com



More information about the Digitalmars-d mailing list