Remix.run Logo
bmacho a day ago

According to them[0], D as better C is indeed just C with less footguns and some additional optional features like RAII (that one can use or not) or more comptime assumptions (again, that one can use or ignore).

I don't think what hinders their adoption is their direction, everything they say they accomplished/plan to accomplish is ideal IMO.

[0] : https://dlang.org/spec/betterc.html#retained

dataflow a day ago | parent [-]

> D as better C is indeed just C with less footguns and some additional features like RAII (that one can use or not) or more comptime assumptions (again, that one can use, or ignore)

Having strictly more features (if we even assume that, which I don't think is accurate) does not imply better.

Javascript is just JSON with more features too. Is it a mystery that people don't ship Javascript code everywhere instead of JSON?

WalterBright 2 hours ago | parent [-]

What the "more features" do is replace the clumsy/inadequate/risky methods used in a less powerful language like C. For example, you don't need to use the C preprocessor to do metaprogramming. D offers a world class metaprogramming capability.

Another example is D enables nested functions. Yes, there are ways in C to do the equivalent, but they are clumsy and indirect.