Why is D unpopular?
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Mon May 23 11:31:06 UTC 2022
On Monday, 23 May 2022 at 09:45:21 UTC, claptrap wrote:
> assert(0) isn't even an assert, it's abort().
I agree that abort() and unreachable() should be different things.
In proofs ```assert(false)``` is a potential disaster as you can
deduce anything from it, kinda like claiming that what must be
true is indeed not true at this point, so it can clearly never
happen, and if it can never happen then anything before it can be
whatever you fancy as it it clearly doesn't matter… Or something
like that :-)
I guess D is borrowing from MSVC ```__assume(false)``` ?
C++23 will provide
[unreachable()](https://en.cppreference.com/w/cpp/utility/unreachable).
More information about the Digitalmars-d
mailing list