title: Swift: "Where" vs "If"
body: <p>Is there any difference between these two syntaxes? If not, any benefit?</p>
  
  <pre><code>if let userName = userNameTextField.text where userName.characters.count &gt; 0,
          let password = passwordTextField.text where password.characters.count &gt; 0,
          let confirmation = confirmationTextField.text where confirmation == password
      else {
          return false
      }
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>if userNameTextField.text?.characters.count &gt; 0 &amp;&amp;
          passwordTextField.text?.characters.count &gt; 0 &amp;&amp;
      confirmationTextField.text == passwordTextField.text
      {
          return false
      }
  </code></pre>