Why is D unpopular?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Mon Nov 15 10:32:55 UTC 2021


On Monday, 15 November 2021 at 06:18:17 UTC, forkit wrote:
> But I mean complete novices. Never exposed to a programming 
> language.

There are languages designed for novices, but they seem to be 
cumbersome for production use.

> Also, I'm not referring to 'language' complexity per se, but 
> rather 'cognitive' complexity.

Yes, this is an interesting topic. I think new (and old) 
programmers benefit from writing pseudo code before they write in 
the implementation language. Basically write the code in their 
own favourite short-hand english mixed with symbols of their own 
choice. We could probably learn a lot about preferences if we 
collected personal "pseudo-code" from a large number of 
programmers.

I think there is quite a distance between the pseudo-code people 
choose to write and implementation in a system level language. 
That in itself suggests to me that "something is missing" in 
terms of usability. There is clearly room for improvement.

> Chunking will impact on your capacity to learn and remember.
>
> Others seem more like an "undifferentiated mess of atomic 
> information items".

The visual image can often be noisy, and text editors provide 
limited tools for visually cleaning up and bringing emphasis to 
the important parts. Maybe also auto-formatting means that 
programmers loose a bit of creativity/interest in improving on 
the visual presentation of code?

> Ever wondered why C++ is so hard for a novice to learn and 
> remember?
>
> Is it because you cannot fit those "undifferentiated mess of 
> atomic information items" into working memory?

Maybe so, and another factor is that they cannot filter out what 
is important and what isn't. It is like driving in a busy city. 
If you seldom do, then it is a scary and taxing experience, 
pedestrians basically jump out in front of the car... With lots 
of experience you filter out all noise and laser focus on the 
critical elements (like kids). If you cannot filter properly then 
you will "run out of space" in your short term memory.

I probably takes a lot of exposure to get used to the extended 
use of C++ namespaces, which makes the code look rather 
cluttered. Might have something to do with visual symbols too. To 
me ```namespace::function()``` looks more like two items than 
```namespace'function()```, so that could definitively be a 
chunking issue. I favour the latter notation for that reason (I 
think it is used by Ada?).

Also unique usage of mnemonics can help. One issue in D is 
reusing symbols and keywords for unrelated things. That is 
obviously making things harder as you now have to associate 
multiple things with the same visual impression, and that has a 
cognitive differentiation cost. So simpler visuals do not have to 
be better.





More information about the Digitalmars-d mailing list