title: assigning multiple vals in conditionals
body: <p>In Java I often find myself assigning to multiple final variables in each branch of a conditional like so:</p>
  
  <pre><code>final _ x;
  final _ y;
  if (_) {
    x = _;
    y = _;
  } else {
    x = _;
    y = _;
  }
  </code></pre>
  
  <p>In Scala I am aware that a single val can be assigned using the technique:</p>
  
  <pre><code>val x = {
    if (_) {
      _;
    } else {
      _;
    }
  }
  </code></pre>
  
  <p>In fact, the above method can be modified to assign to multiple variables by having the block return a tuple that is pattern matched to variables like:</p>
  
  <pre><code>{
    if (_) {
      _;
    } else {
      _;
    }
  } match { case (x, y) =&gt; _ }
  </code></pre>
  
  <p>But I find this syntax to be quite awkward. Is there a simpler way, ideally similar to the Java code, to do what I want?</p>