Why does nobody seem to think that `null` is a serious problem in D?

NoMoreBugs NoMoreBugs at gmail.com
Thu Nov 22 00:42:32 UTC 2018


On Wednesday, 21 November 2018 at 17:11:23 UTC, Stefan Koch wrote:
>
> For _TRIVIAL_cases this is not hard.
>
> But we cannot only worry about trivial cases;
> We have to consider _all_ cases.
>
> Therefore we better not emit an error in a trivial case.
> Which could lead users to assume that we are detecting all the 
> cases.
> That in turn will give the impression of an unreliable system, 
> and indeed that impression would not be too far from the truth.

On the face of it, that seems a reasonable argument. i.e. 
Consistency.

On the other-hand, I see nothing 'reliable' about handing off the 
responsibility of detecting run-time errors, to the o/s ;-)

I would prefer to catch these errors at compile time, or run time.

D can do neither it seems.



More information about the Digitalmars-d-learn mailing list