D mentioned on Rust discussions site

Walter Bright newshound2 at digitalmars.com
Thu May 21 20:34:19 UTC 2020


On 5/21/2020 3:57 AM, Patrick Schluter wrote:
> ANSI C89 and then C99 changed C significantly. Some of the features introduced 
> make modern C quite different from the initial K&R C.

Sorry, nope.

What C89 mostly did was clear up unspecified areas in K+R that had resulted in 
incompatible compilers. In particular, whether value-preserving or 
sign-preserving integral promotions were done. About half the compilers did it 
one way, half the other.

Value-preserving rules were selected, and the out-of-luck C compiler vendors 
were pretty graceful in accepting the changes for the greater good.

Another was clearing up confusion in how the preprocessor was supposed to work.

C99 mainly cleared up a lot of uncertainty in IEEE floating point arithmetic, by 
stamping approval on the obvious things the C compilers were doing anyway. C99 
added a couple new features, which were badly designed and remain unused - 
things like 'restrict' and that weird way to allocate arrays on the stack. Oh, 
and those miserable trigraphs, which were never used outside of test suites.

Maybe you're talking about function prototyping. They were very welcome, indeed, 
but they didn't make C "quite different" at all.

A "quite different" change would be something like adding modules, or getting 
rid of the preprocessor.


More information about the Digitalmars-d mailing list