Is D really that bad?

Ali Çehreli acehreli at yahoo.com
Thu Nov 3 05:29:22 UTC 2022


On 11/2/22 21:54, Max Samukha wrote:
 > On Wednesday, 2 November 2022 at 21:17:22 UTC, Ali Çehreli wrote:
 >
 >> Those 16+ million developers are not the designers of Javascript; they
 >> just use it. The reason Javascript has private-to-class is because
 >> other languages had that before Javascript was created in 1995.
 >>
 >> Ali
 >
 > The millions of lemmings might be right in this case. There seems to be
 > no good reason to think module-level is superior to class-level.

Yes: Just like there is no reason class-level is superior to 
module-level. There are pros and cons to both. For example, module-level 
is better because it obviates the need for the 'friend' keyword.

 > It is
 > definitely surprising

Yes, a new language can be surprising in many ways.

 > and annoying

That's harsh and subjective... That can't be a reason to complicate the 
language. In my case, I fully embraced module-level private as a net 
win. If I am not alone, it is proof there are also programmers that 
think otherwise.

 > to a lot of programmers coming from
 > class-based OOP languages.

I welcome all of them and invite them to realize that they want (not 
"need") class-level private just because they are used to it.

Ali



More information about the Digitalmars-d mailing list