On Thu, 14 Apr 2011 14:57:44 -0400, Andrei Alexandrescu <seewebsiteforem...@erdani.org> wrote:

On 4/14/11 1:26 PM, Steven Schveighoffer wrote:
On Thu, 14 Apr 2011 13:54:00 -0400, Andrei Alexandrescu
<seewebsiteforem...@erdani.org> wrote:

On 4/14/11 12:26 PM, Steven Schveighoffer wrote:
Any particular reason why adding a new trait is more
desirable than modifying assert?

Absolutely!

Maybe I worded my question wrong. What I meant was what *is* the
particular reason.

Already mentioned it - enforce() is a prime example. Any similar facility could make good use the feature.

Sure. However, not modifying assert means all asserts in my code should now be rewritten to myassert, or whatever function is implemented. The huge benefit of modifying assert is that we don't have to change any existing code.

I'm not saying adding a trait is not desirable, I just think it doesn't get us to the right place on its own.

If I ever get around to hacking the compiler, I certainly will try this to see how well it works.

-Steve

Reply via email to