title: Swift -> Struct or Class for the repository pattern?
body: <p>I am building an iOS application in Swift.</p>
  
  <p>The access to the data store is handled using a <code>Repository</code> which is a protocol.</p>
  
  <p>Is it a good idea to use a <code>struct</code> for the implementation of the <code>Repository</code> or should it be a <code>class</code>?</p>
  
  <p>What my concern is that, if the repository implementation is a <code>struct</code>, then copying a <code>Repository</code> on assignment might lead to several copies each having slightly different sets of data.</p>