On Jun 27, 2010, at 11:32 PM, Andrei Alexandrescu <[email protected]> wrote:

> Has anyone played with the new assert semantics? I find them a significant 
> step down from before.

No, and I'm not looking forward to it either! My asserts are sprinkled in 
unittests, helper functions, contracts, and in the main codebase. The current 
scheme is unnatural for me.


> 
> Consider:
> 
> int x;
> ...
> assert(x == 2, text(x));
> 
> I'm not seeing an actual message informing that an assertion has failed! In 
> case it does fail the text is just printed and as such it is 
> indistinguishable from regular debug chatter.
> 
> Walter, please revert the semantics of assert. This can't be worked with.
> 
> If you do want to improve things, please have assert abort the current 
> unittest and continue to the next one. The current semantics is unbearable.

This is the basic scheme I had assumed before reading through the changeset. I 
can't appreciate Walter's performance concerns since I don't really know their 
impacts. I naïvely assume a global could be set which changes behavior from an 
abort to an error (exception)
_______________________________________________
dmd-internals mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-internals

Reply via email to