Why is D unpopular

Max Samukha maxsamukha at gmail.com
Mon Jun 13 07:26:19 UTC 2022


On Sunday, 12 June 2022 at 14:56:53 UTC, Mike Parker wrote:
> On Sunday, 12 June 2022 at 14:05:00 UTC, Max Samukha wrote:
>> On Sunday, 12 June 2022 at 11:47:53 UTC, Mike Parker wrote:
>
>>
>> Hi, Mike! Congratulations on being the first unsurprised D 
>> user! (You were actually surprised for a moment, weren't you?)
>
> No. Nor was I surprised, for example, when I learned that in 
> Python all members are public, or that `protected` in C# is 
> more restrictive than `protected` in Java.
>
> Every language has a similar approach as other languages to 
> some things, a different approach to others. I've investigated 
> enough programming languages that I learned long ago to be open 
> to the differences and never to expect that just because 
> something is true in Language A that it will be true for a 
> similar feature in Language B.
>
> I often have reactions of "neat" or "cool", or "too bad" or 
> "that sucks", but I can't say I'm ever really surprised when 
> You have to learn to think in the language you're using if you 
> want to be productive with it, and that means accepting the 
> differences. You may find some things grate on your nerves 
> because they don't square with your view of the world, in which 
> case you either push to change them, accept them, or, if it's 
> too much to handle, move on to a language that better fits your 
> mental model. The latter is why I never stuck with C++.

The problem is that there are no 'practical' languages to move on 
to. All of them make you maintain inconsistent metal models. 
Like, 'synchronized' is class-level, its semantics is based on 
the assumption that 'private' is class-level too, but it is not, 
so 'shared' is broken as a consequence.

>
> When I first learned about D's private-to-the-module approach, 
> it made perfect sense to me. It fits right in with D's concept 
> of modules.

Right. The problem is it doesn't fit in with the concept of 
classes.

>
> I have been surprised occasionally, though, when I was certain 
> a feature worked a certain way, but I learned later my 
> understanding was wrong. There were a couple of those instances 
> when I was writing Learning D, but I can't for the life of me 
> remember what they were.

Yes, I have a similar experience. Some of the features made 
perfect sense after I had learned the reasoning behind them. 
Unfortunately, the module-level 'private' is not one of those.


More information about the Digitalmars-d mailing list