References in D

Maxim Fomin maxim at maxim-fomin.ru
Sat Sep 15 06:36:57 PDT 2012


On Saturday, 15 September 2012 at 12:43:22 UTC, Alex Rønne 
Petersen wrote:
> But this being said, I agree that references being nullable by 
> default is hurtful. It allows any object reference to have an 
> invalid state even though in 99% of cases, that doesn't make 
> sense. It's a giant hole in the type system that many new 
> languages have gotten rid of very early (forcing the programmer 
> to use explicit option/nullable types).

Are speaking about classes? Then how they can be initialized 
(except for null and other existing object)?




More information about the Digitalmars-d mailing list