[swift-evolution] Epic: Typesafe calculations
erica at ericasadun.com
Thu Jan 21 15:09:05 CST 2016
Going off the top of my head, I'd imagine it's a product type that inherits memory layout, code reuse, and conformances but introduces a distinct type for type safety checks. You could specialize the derived type with behavior and conformance that do not exist for the parent.
(It may also gain additional fields, I suppose, as well as super-type behavior calls, isKindOf checks, etc)
> On Jan 21, 2016, at 1:50 PM, David Waite via swift-evolution <swift-evolution at swift.org> wrote:
>> On Jan 21, 2016, at 1:22 PM, Dave Abrahams via swift-evolution <swift-evolution at swift.org> wrote:
>> Yes, struct subtyping has come up several times. There are several
>> things I'd like to do with it in the standard library.
> What do people mean when they say struct subclassing? Code reuse, polymorphism, or something else?
> Sent with my Thumbs
> swift-evolution mailing list
> swift-evolution at swift.org
More information about the swift-evolution