[swift-evolution] [Discussion] Seal `T.Type` into `Type<T>`
    Anton Zhilin 
    antonyzhilin at gmail.com
       
    Fri Jul 15 13:48:01 CDT 2016
    
    
  
Some corrections on my previous post:
   1. class var sharedInstance won’t work because of dynamically created
   types
      - We’ll still need a global set. Otherwise, the idea remains the same
      - The global set will be of type Set<_Type<Any>>
   2. Advantages of nested _Type<T>:
      - Type<T> can have all kinds of initializers without losing uniqueness
      - Usage of a final class is an implementation detail. We just need
      reference semantics from it
   3. In my “builder” example:
      - var builder
      - name: "Age"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160715/d2f6ac02/attachment.html>
    
    
More information about the swift-evolution
mailing list