News for hackers. Stuff that matters.
Re:D as a C Replacement by WalterBright on Tuesday July 02, 2019 @10:51PM (#20341216)
> C does work pretty well

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.

Re:D as a C Replacement by x0re4x on Wednesday July 03, 2019 @01:30AM (#20341850)
> 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).

Re:D as a C Replacement by WalterBright on Wednesday July 03, 2019 @02:08AM (#20342011)
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.)

Re:D as a C Replacement by x0re4x on Wednesday July 03, 2019 @02:32AM (#20342107)
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.