title: Inheritable static factory method in Swift class
body: <p>Consider this static factory method written in Objective-C:</p>
  <pre><code>@implementation User
  
  + (instancetype)named:(NSString *)name {
      let user = [self new];
      user.name = name;
      return user;
  }
  
  @end
  </code></pre>
  <p>How do I implement it in Swift?
  The plenty of <code>Self</code>/<code>self</code>/<code>Type</code>/<code>type</code> keywords in Swift feels fuzzy and I struggle to figure out the right solution.</p>