[swift-evolution] Epic: Typesafe calculations

Tino Heth 2th at gmx.de
Sun Dec 27 04:35:32 CST 2015

> There seem to me to be multiple ways to solve this problem - a newtype(esque) keyword, struct subtyping, or forwarding as Matthew is suggesting

Imho it would make sense to start a topic about inheritance for structs — of cause there a good theories why this isn't possible, but subtyping on its own isn't problematic:
You just have to disallow polymorphism (at least for subtypes with own properties).
I wonder if there has been a decision to just disable inheritance for structs completely to avoid confusion with the lesser strict rules of reference types…

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151227/1bb0c162/attachment.html>

More information about the swift-evolution mailing list