On Monday, 26 October 2015 at 15:17:37 UTC, Atila Neves wrote:
Would `onAssertFailed` have an implementation in druntime?

Yes, that's my plan.

If one is included with D after this DIP is implemented, how would one override the default behaviour?

Do I understand it correctly that `assert(a == b)` and `assert(a != b)` would call different overloads?

That depends on how we want this to work.

The reason I ask about that last one is because there's no overloading of `!=` in D.

Atila

Ahh, good catch.

Eventhough compiler rewrites

    X != Y

into

    !(X == Y)

and we cannot explicit overload opBinary!"!=" there is nothing stopping us allowing

    onBinaryAssert!"!="

in the rewriter.

I'll update

http://wiki.dlang.org/DIP83

with a proposed solution for `!=`-lowering.

Reply via email to