Rust kind of went in a different direction. Why? Understanding C syntax is pretty basic, there are a lot of C like languages. Why not be another one?
Personally, if every language was just a C variant I'd be happier. It would feel like "OK, I've got the basics down, let's go explore this dialect that added garbage collection and strings as real types" rather than "I want strings as real types, darn it, I need to go learn this Tcl language". That might be an extreme way to make my point, but I think it's clear, right?
* Assignment as an expression is bug-prone
* The precedence for the binary operators is wonky
* Optional braces in if statements make the grammar ambiguous and is also bug prone (the infamous Apple goto bug)
* The type-declaration syntax is convoluted and people need tools like cdecl to understand the more tricky ones.
* The cast syntax is ambiguous and resolving this ambiguity relies on adding dirty hacks to the lexer to tell the parser about type names.
Can be fixed without syntax change other than returning void.
> The precedence for the binary operators is wonky
But that's the precedence everyone is accustomed with. D enhance this by forbidding some non-parenthesized dangerous expressions.
> Optional braces in if statements make the grammar ambiguous and is also bug prone (the infamous Apple goto bug)
I've definately seen such bugs.
> The type-declaration syntax is convoluted and people need tools like cdecl to understand the more tricky ones.
This is fixed in languages that still feel C-like in syntax.
> The cast syntax is ambiguous and resolving this ambiguity relies on adding dirty hacks to the lexer to tell the parser about type names.
Yup.
Here's an example. When I was doing the GUI tools for BitKeeper 20 years ago I used Tcl because Tk was (and still is so far as I can tell) the best gui toolkit around. But Tcl? Holy moly, what a miserable language (with apologies, and respect to John O, it's miserable). So I got some compiler people to make a second, parallel, compiler that took what looked like C as input and compiled it down to Tcl byte codes.
Pingo! All the power of Tk but with a C-like language on top. And you can call the tcl library code and it can call you.
All open source at http://little-lang.org
I wish someone would take the ideas there and make a gcc/clang dialect that had all C stuff but added in a ref counter and real strings, etc.