title: Why do comparisons in java 8 still use int instead of Enum?
body: <p>When using for example a comparator, the output of the <code>compare</code> method is an int. To me it seems that using an <code>Enum</code> (e.g. <code>Comparison</code>) with values like <code>Smaller</code>, <code>Equal</code> and <code>Larger</code> could make the code more readable and less error-prone.</p>
  
  <pre><code>// The comparison result could support methods
  return compare(o1, o2).ifEqual(compare(o3, o4))
  
  // Tests can be more readable
  if(compare(o1, o2) == Equal &amp;&amp; compare(o3, o4).isNot(Larger)) ...
  
  // The compiler can now spot mistakes like returning a meaningless number
  </code></pre>
  
  <p>You could still support old style <code>compare(o1, o2).toInt() &lt;= 1</code> and <code>Comparison.from(i2 - i1)</code>.</p>
  
  <p>Is there any reason except that backwards compatibility would be tough to solve?</p>