On Friday 29 October 2010 03:06:56 dennis luehring wrote: > Am 29.10.2010 11:07, schrieb Denis Koroskin: > > On Fri, 29 Oct 2010 11:58:56 +0400, dennis luehring<dl.so...@gmx.net> > > No one is talking about removing nullable references but rather adding > > non-nullable types and making them default. You could still achieve old > > behavior if it is needed (most proposed proposed syntax): > > > > Foo? foo = stuff.find(predicate); > > if (foo is null) { > > > > // not found > > > > } > > > > No one is talking about removing nullable references > > sorry > > > most proposed proposed syntax > > like it works in C# - but better because of "...and making them default." > :) > > sound very similar to the long talked about "make parameters const per > default" proposal - which is also still not there :(
Personally, I think that both would be horrible. Having const is great, and having non-nullable references could be great, but I sure wouldn't want them to be the default. In addition to that, however, having them as the default would make porting code from other C-based languages a total nightmare - not to mention it totally shatters the general principle that either C/C++ code is valid D code with the exact same behavior it doesn't compile. That alone makes making them the default untenable. - Jonathan M Davis