Common ground. Re: Null references redux
bearophile
bearophileHUGS at lycos.com
Tue Sep 29 04:39:13 PDT 2009
Don:
> Maybe if D had better flow analysis, the demand for
> non-nullable references wouldn't be so great.
I know a good enough C# programmer that agrees with you, he says that thanks to the flow analysis C#compiler performs, the need for non-nullable references is not so strong.
> (Neither is a pure subset of the other, flow analysis works for all
> variables, non-nullable references catches more complex logic errors.
> But there is a very significant overlap).
I like how you can see things a little more clearly than other people (like me).
Flow analysis helps for all variables, but it's limited in the scope. Nonnullable references are a program-wide contract, their effect extends to called functions, etc. And helps avoid null tests inside them too.
Probably flow analysis is the most important among such two features. I think having both is better, they can work in synergy.
Bye,
bearophile
More information about the Digitalmars-d
mailing list