Consider C's Biggest Mistake:
https://www.digitalmars.com/articles/b44.html
You can use D in -betterC mode, write code pretty much just like you would in C, and not have that problem.
Consider C's Biggest Mistake:
https://www.digitalmars.com/articles/b44.html
You can use D in -betterC mode, write code pretty much just like you would in C, and not have that problem.
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).
(It does have RAII without using exceptions.)