Linked by Owen Anderson on Mon 19th Apr 2004 05:43 UTC
General Development For years the development scene has been dominated by the C family of languages, primarily C itself and its immediate successor C++. Recent years have given rise to other C-descendents, however, such as Sun's Java and Microsoft's C#.
Permalink for comment
To read all comments associated with this story, please click here.
Curly braces and semi-colons
by Geoff Gigg on Wed 21st Apr 2004 02:55 UTC

There's a lot to like in D. It's the C and C++ that should have been. And if someone is starting out fresh and needed a C or C++ like language, then it would be a good choice.
For others, there's probably too much inertia to overcome. People get set in their ways, and are blind to the faults in their language of choice.

I just wish that Walter Bright hadn't given in to the idea that he could lure existing C/C++ coders. He rightly says that source-code compatibility is a non-starter if he wants to make a robust, viable language.

But he gave in to the look and feel in order to make D a familiar environment for C and C++ programmers and create a short learning curve. I think this was counter-productive. They aren't coming over, and new programmers would be rightly put off by yet another curly brace language. Make a complete break! Banish curly braces and semi-colons to the ash-heap of dead languages. Not to mention parenthesized fors, whiles, switches, etc. How a language looks on the page has a lot to do with its productivity, lack of bugs, etc. Esthetics count.

Look at his sieve of Erastothenes sample program at the bottom of his introductory page with a fresh eye: http://www.digitalmars.com/d/index.html

Now how do those isolated curly braces contribute to your understanding? Are they for you, or for the compiler? They are just noise on the page. Next, some lines end in semi-colons, some don't. How does that help your understanding? Not one whit.

(On the other hand, I think D is the only major compiled language I have seen that allows more than integer values in the SWITCH statement - not C, C++, JAVA, C#, ADA. Only the much maligned VB has a comparable feature in its SELECT statement.)