Disallow null references in safe code?
Joseph Cassman
jc7919 at outlook.com
Mon Feb 3 23:55:40 PST 2014
On Tuesday, 4 February 2014 at 06:03:14 UTC, Andrei Alexandrescu
wrote:
> On 2/3/14, 9:09 PM, Jonathan M Davis wrote:
>> I truly hope that that's never the case. Adding non-nullable
>> references to the
>> language is one thing; making them the default is quite
>> another, and making
>> them the default would break existing code. And given Walter's
>> normal stance
>> on code breakage, I'd be very surprised if he were in favor of
>> making non-
>> nullable references or pointers the default.
>
> We are considering making non-nullables the default, @nullable
> to mark optionally null objects, and enable the related checks
> with an opt-in compiler flag.
>
> Andrei
I am really interested in learning more about how the data you
have collected moved you and Walter to make this large change.
Especially since it seems that much of the time arguments made
for or against either side of the issue seem to be based on
anecdotal evidence, or built up based on the small slice of
coding that we each deal with. If you get time for an article
that would be pretty cool.
Joseph
More information about the Digitalmars-d
mailing list