assert(false) in release == splinter in eye

Christopher Bergqvist chris at digitalpoetry.se
Tue Oct 12 11:58:39 PDT 2010


On Tue, Oct 12, 2010 at 2:37 AM, Andrei Alexandrescu <
SeeWebsiteForEmail at erdani.org> wrote:

> assert(false) could be in an ideal world replaced by an intrinsic called
> e.g. halt() that looks and feels like a regular function but is recognized
> by the compiler. No new keyword would be needed. But I don't think that
> would mark a significant improvement in the language.
>

Would it be possible to change the compiler to only treat "assert(false);"
specially, avoiding treating "enum a = 0; assert(a);" or more complex
constructs that way?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20101012/c6b8f083/attachment-0001.html>


More information about the Digitalmars-d mailing list