title: Why not provide an operator ? : in scala
body: <p>There is an operator <code>? :</code> in Java which can be used to select a value according to the boolean expression. For example, the expression <code>3 &gt; 2 ? "true" : false</code> will return a string <code>"true"</code>. I know we can use <code>if</code> expression to do this, but I will prefer this style because it is concise and elegant. </p>