C is Brittle D is Plastic
Walter Bright
newshound2 at digitalmars.com
Tue Apr 7 05:25:41 UTC 2026
On 4/4/2026 7:34 PM, Cid Lib wrote:
> If I were on the ISO C Committee, I would not see my job as 'fixing' C, by
> trying to give it a brain, but rather ensuring the language remains the
> 'somewhat' mindless guardian of legacy code that it is, while simultaneously
> ensuring it remains a language that can continue to be used in cases where it
> would not be considered professionally negligent to do so.
The C committee adds new features all the time.
> The only proposal I would 100% vote for, would be a proposal for categorizing
> the C language to the world more correctly - i.e. renaming it to UnsafeC (for
> example).
>
> Every attempt to 'fix' C, eventually just results in a different language entirely.
My proposal is a simple addition to C. C has already copied features from D
(like `static_assert`).
> "The great thing about C is that it doesn't try to be smarter than you. If I see
> p = q, I know exactly what the CPU is doing. If p is a fat pointer, now the
> compiler is doing multi-word copies and hidden arithmetic behind my back. And
> that is not C!" - (A Hypothetical Linus)
`p = q` does not involve hidden arithmetic. It's an assignment of two words.
Like `long long` is (often) an assignment of two words.
More information about the Digitalmars-d
mailing list