Why is D unpopular?

12345swordy alexanderheistermann at gmail.com
Mon Nov 8 19:56:11 UTC 2021


On Monday, 8 November 2021 at 18:02:27 UTC, Ola Fosheim Grøstad 
wrote:
> On Monday, 8 November 2021 at 17:40:08 UTC, 12345swordy wrote:
>> class as a reference type makes sense as you are dealing with 
>> polymorphism.
>
> Maybe so, but you could have the same typing scheme. Just make 
> it a typing error to instantiate it as a non-reference type.
>
> So you could for instance collapse struct/class, yet allow the 
> programmer to specify that this particular struct/class can 
> only be instantiated as heap-object.
>
> And you could similarly put a ban on virtual members. So rather 
> than having special cases struct and class, you allow the 
> addition of constraints to a singular aggregate concept.

That would be reaching near the infamous "curse of lisp" here.

-Alex


More information about the Digitalmars-d mailing list