title: Why does Scala's indexOf (in List etc) return Int instead of Option[Int]?
body: <p>I want to write really nice looking idiomatic Scala code <code>list indexOf foo getOrElse Int.MaxValue</code> but now I have to settle for idiotic Java looking code <code>val result = list indexOf foo; if (result &lt; 0) Int.MaxValue else result</code>. Is there a good reason that <code>indexOf</code> in Scala returns <code>Int</code> instead of <code>Option[Int]</code></p>