Hacker News new | ask | show | jobs
by x0re4x 2541 days ago
> Consider C's Biggest Mistake

I do not think it is a significant problem in C. It might be more of a problem in C++.

> You can use D in -betterC mode, write code pretty much just like you would in C, and not have that problem.

D is an improved, more polished version of _C++_, not C; "-betterC" mode is misleading, it is more of a "betterC++" mode (features: classes, exceptions, RAII, templates).

"The simplicity of C is more useful than the additional features of C++." -- (Sam Watkins) s/C++/D/g

Don't get me wrong: D would be a great replacement for _C++_, but not C. For a better C I would look at a subset of Go (GC would have to go away).

1 comments

D in "betterC" mode does not have GC, classes, exceptions, or RTTI. Nor does it need the D (or C) runtime library.

(It does have RAII without using exceptions.)

Thank you for clarification. I was looking at https://www.digitalmars.com/articles/betterC.html, https://dlang.org/spec/betterc.html is a better description.