Why does nobody seem to think that `null` is a serious problem in D?
Tony
tonytdominguez at aol.com
Sat Dec 1 18:30:05 UTC 2018
On Saturday, 1 December 2018 at 11:16:49 UTC, Dukc wrote:
> This is great when it works, but the problem is that it would
> be gargantuan effort -and compile time sink- to make it work
> perfectly. When it's just about if-else if chains, switches or
> boolean logic as in the example, the analysis won't be too
> complicated. But swap those booleans out for a string, and make
> the conditions to test whether it's a phone number, and whether
> it satisfies some predicate implemented in a foreign language,
> and you'll see where the problem is.
I think he is just talking about the compiler or static analyzer
seeing if a variable has been given a value before it is used,
not if it was given a valid value.
More information about the Digitalmars-d-learn
mailing list