title: What's the difference between realm.write and realm.beginWrite+realm.commitWrite?
body: <p>There are two ways of performing a write transaction in Realm, what's the difference between them?</p>
  
  <p>1.</p>
  
  <pre><code>try! realm.write {
    ...
  }
  </code></pre>
  
  <p>2.</p>
  
  <pre><code>realm.beginWrite()
  ...
  try! realm.commitWrite()
  </code></pre>