title: Is there an Kotlin equivalent `with` function in Swift?
body: <p>In Kotlin, we could change the below</p>
  
  <pre><code>// Original code
  var commonObj = ClassCommonObj()
   commonObj.data1 = dataA
   commonObj.data2 = dataB
   commonObj.data3 = dataC
  
  // Improved code
  var commonObj = ClassCommonObj()
  with(commonObj) {
      data1 = dataA
      data2 = dataB
      data3 = dataC
  }
  </code></pre>
  
  <p>However in Swift as below, do I have equivalent <code>with</code> function to use?</p>
  
  <pre><code>// Original code
  var commonObj = ClassCommonObj()
   commonObj.data1 = dataA
   commonObj.data2 = dataB
   commonObj.data3 = dataC
  </code></pre>