A few questions
bearophile
bearophileHUGS at lycos.com
Fri Jul 27 16:48:00 PDT 2012
Jonathan M Davis:
> Adding something to the language doesn't buy you much more than
> that anyway.
In the case of not-nullability, this isn't true. Integrating
not-null in the type system allows the language to do things you
can't do with NotNull, like:
// x is a nullable class reference
if (x == null) {
...
} else {
// here the type system sees x as not null.
}
There are some other similar things you can't do with NotNull. In
my enhancement request about not-nullability there are references
to articles that explain the situation.
> D arguably has too many features as it is.
I don't agree, the number of features is not important. What's
important is how clean and intelligently they are designed, how
cleanly they interact with the other features. etc.
> And as big a deal as you seem to think that this is, the _only_
> C-based language that I'm aware of which has non-nullable
> references as part of the language is C#.
This is not true. Scala, Rust, some new Java-derived languages,
and more modern languages have not nullable references. In
practice I think most or all new languages coming out now have
this feature. In my opinion in few years programmers will expect
to have it in all languages that are not too much old and that
support some kind of nullable references.
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list