title: Subclassing Swift Double / Operator Overloading typealias
body: <p>I'd like to be able to subclass Double with some custom types in my swift code so I can do some introspection and operator overloading later on.</p>
  
  <p>This is semantically what I want to be able to write:</p>
  
  <pre><code>class Frequency: Double {}
  
  class Period: Double {
      init(_ frequency: Frequency) {
          let period: Double = 1 / frequency
          self.init(period)
      }
  }
  
  
  let a = Double(1)
  print(type(of: a))  // Double
  
  let b = Frequency(2)
  print(type(of: b))  // Frequency
  
  let c = Period(a)
  print(type(of: c))  // Period == 1
  
  let d = Period(b)
  print(type(of: d))  // Period == 0.5
  </code></pre>
  
  <p>Feel like what I'm trying to do should be posible as Swift is a strictly typed language.</p>
  
  <p>I've looked at typealiases as well, but you can't operator overload with those. Also looked at the FloatingPoint protocol but doesn't seem to help me.</p>