Why is D unpopular

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Mon Jun 13 11:06:33 UTC 2022


On Monday, 13 June 2022 at 11:00:17 UTC, Ola Fosheim Grøstad 
wrote:
> Or to explain it in simple terms:
>
> *A cast to a supertype should only imply additional 
> restrictions.*
>
> In this case the opposite happens. So this aspect of the type 
> system is broken.

Or perhaps this formulation is less confusing:

*A cast to a superclass is an act of forgetfulness*

Being forgetful should not enable you do do more. The less you 
know, the less you should be able to do. The more you know, the 
more you should be able to do.





More information about the Digitalmars-d mailing list