Semicolons: mostly unnecessary?

bearophile bearophileHUGS at lycos.com
Wed Oct 21 15:29:37 PDT 2009


>Why not eliminate the requirement for semicolon statement terminators (unless there are multiple statements per line)?<

Probably mostly because both some part of D language, some part of the mind of D developers, and some of the D programmers are "old school" and like to do things as they were in the past. I can list you twenty examples of this. Breaking old habits is not easy.

-----------------

Adam D. Ruppe:

> It looks wrong,

To me semicolons everywhere look wrong, even if I've programmed enough with languages that require a semicolon at the ends.


> breaks habit,

It breaks a negative habit.


> opens up bizarre parsing corner cases,
> and makes error messages uglier.

I have yet to see a proof of this.


> Next thing you know someone will propose eliminating braces and just
> using whitespace to denote blocks. It's utter madness.

Even "worse", someone may even implement such alternative D syntax, and the sky will fall on your head:
http://delight.sourceforge.net/

Bye,
bearophile



More information about the Digitalmars-d mailing list