Null pointer dereferencing in D

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 13 17:53:24 PDT 2014


On Saturday, 14 June 2014 at 00:40:06 UTC, Jonathan M Davis via
Digitalmars-d wrote:
> True, some types become problematic when you have to have an 
> init value (like
> a NonNullable struct to make nullable pointers non-nullable), 
> but generic code
> is way more of a pain to write when you can't rely on an init 
> value existing,
> and there are a number of places that the language requires an 
> init value
> (like arrays), making types which don't have init values 
> problematic to use.
> Overall, I think that adding @disable this() to the language 
> was a mistake.
>
> - Jonathan M Davis

Yes, because who care about the code being correct, or even what
it does being defined ? As long as it is easy to write.


More information about the Digitalmars-d mailing list