top | item 3940075

(no title)

pkmays | 14 years ago

Good for Microsoft. If they think something is standardized garbage then they shouldn't have to use it.

C99 and C11 look like mutants compared to C89. Too many bad design decisions made by a group of people who weren't involved with the initial standardization. They even did the very thing the guy who _invented_ the language explicitly told their predecessors in no uncertain terms not to do, and reintroduced noalias pointers into the language [1].

[1] http://www.lysator.liu.se/c/dmr-on-noalias.html

discuss

order

stephencanon|14 years ago

Both C99 and C11 add many useful features to the language. I don't love all of the additions, but I use enough of them everyday to consider them a net benefit. It's still a vastly simpler and cleaner language than C++.

`noalias` was fundamentally broken, which is why it was never adopted by the committee. Instead, `restrict` was standardized, but `restrict` does not suffer from the problem that Ritchie highlights in the post you linked to.

It's also worth noting that C99 fixed some significant oversights in the C90 standard; C99 fully specified integer division for example (C90 left the behavior implementation-defined for negative arguments).

pkmays|14 years ago

There are some Good Parts to C99/C11, most of them adopted from Unix and Plan 9. Not surprisingly, most of the bad parts are all inventions.

Read the link to dmr's comment again. His argument wasn't so much that noalias was specified incorrectly, it was that the whole idea of adding any kind of alias specifier to the language is against the spirit of C. I agree, and apparently so did the C++ committee. If you want to write FORTRAN, write a FORTRAN spec. Leave C alone.