▲ | dataflow a day ago | |
> 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. |