Just an example, why D rocks, and C++ s***s...

bauss jj_1337 at live.dk
Thu Mar 17 08:48:29 UTC 2022


On Thursday, 17 March 2022 at 07:38:52 UTC, Carsten Schlote wrote:
> On Wednesday, 16 March 2022 at 11:56:33 UTC, bauss wrote:
>> There's also a clear difference in the philosophy of the two 
>> languages.
>>
>> D aims a lot to be general purpose, C++ aims to be flexible 
>> and usable in all areas, even low-level or obscure systems.
>
> In BetterC mode or with GC disabled you can use D for low-level 
> as well.
>
>> Thus D standard library makes a lot of decisions and 
>> assumptions for the users and locks users within those 
>> guidelines mostly.
>
> The phobos library is perfectly tuned to support every-days 
> work, D scripts (!) and tools. I use Dlang a lot for scripting 
> and build tools. This is more or less impossible in C/C++ as 
> nearly everything useful is missing in libc and the stdc++ 
> libraries.
>
>> C++ doesn't make a lot of decisions or assumptions about the 
>> user, everything is mostly left up to the user to decide how 
>> they want to do a specific thing.
>
> So everyone is reinventing the wheel for even the most simplest 
> things. This is surely no advantage.
>
>> So if you want total control and freedom, then you'll end up 
>> with something like what C++ offers anyway.
>
> As said, in BetterC mode you can create bare-bine code as well. 
> But with most important D language features still available.

I'm not siding with C++ lol... I'm just stating why it's 
different.

Obviously I prefer D over C++, otherwise I'd be active elsewhere.


More information about the Digitalmars-d mailing list