Re: If you could change the C or C++ or Java syntax, what would you
like different?
On 10/08/2010 03:09 PM, Alexander wrote:
Please share your oppinion on anything you do not like in the C or C++
or Java syntax (they're quite similar).
Let me try int &c in C, List<List<Foo>> in C++, or int *x; in Java. Oh wait.
There is a not-insignificant amount of difference between C, C++, and
Java. The primary things that are really the same between the languages
is the use of curly braces for scope definition, semicolon-terminated
statements, the use of `\' as an escape character, and the function
calling syntax of func(args). The latter two are common even in those
languages which are not curly-braced delimited (e.g., python), and
aren't really anything that people would complain about.
That pretty much leaves the curly-brace-delimited and
semicolon-delimited natures as the only truly common parts of syntax
which are arguable, and probably anyone who would be inhabiting these
newsgroups are not going to be arguing against those.
I would like to note that many of my... issues with C++ and Java
syntaxes are of those constructs which are (more or less) unique to
those languages [1], so "they're quite similar" isn't good enough.
In order to maintain the integrity of the discussion (have everything
at the same place) please respond on comp.lang.c.
That sounds nice until you realize that many people on the other
newsgroups don't follow comp.lang.c, such as yours truly.
[1] Java generics and C++ templates are sufficiently different that I am
going to call them unique constructs.
--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth