On Friday, 4 April 2014 at 01:54:16 UTC, Ben Boeckel wrote:
There is *zero* rationale as to why this would be a compilable
implementation of comparison:

    int compare(int a, int b) {
        return a * b;
    }

The fact that this compiles when used as a comparison is *insane* when
you take a fresh look at how you can construct a language.

You're actually not restricted to int; you can also return float, or in fact any type that's compare to 0, including user-defined types that implement their own `opCmp`.

Reply via email to