A better assert() [was: Re: std.unittests [updated] for review]
bearophile
bearophileHUGS at lycos.com
Fri Feb 4 04:30:42 PST 2011
Jonathan M Davis:
> However, I don't see why there would be any problem with
> assert(0) meaning halt. It's a normal assert in non-release mode and it sticks
> around in release mode, becoming a halt instruction. I use it that way all the
> time. I don't see any problem with it whatsoever.
There was a recent discussion about this. The final consensus was that assert(0) to mean HALT is a small wart in the D language, but it's not worth fixing it, because it's a small enough defect. But if now assert() gets a significant facelift, then this little problem may be fixed along with the other two.
Bye,
bearophile
More information about the Digitalmars-d
mailing list