Rust as a gateway drug to Haskell
&gt; More advanced type systems, however, allow to specify the generic constraints explicitly.<p>Well, Java allows it, even if it looks a bit unglier than the Rust example.<p><pre><code>    &lt;T extends Comparable&lt;T&gt;&gt; T min (T a, T b) {
        if (a.compareTo(b) &gt; 0) { return b; } else { return a; }
    }
</code></pre>
And even without general availability of concepts (already in gcc 6.x), one can achieve it in C++ via <i>if constrexpr</i>.