[swift-users] It seems like we really need an #include preprocessor directive?

Jens Alfke jens at mooseyard.com
Sun Mar 12 00:29:46 CST 2017

> On Mar 11, 2017, at 10:21 PM, David Sweeris <davesweeris at mac.com> wrote:
>> (I see absolutely nothing wrong with inheritance, and it solves exactly this sort of problem. Yes, structs can’t inherit, but they can contain a common struct as a member, which is quite similar and addresses this issue.)
> That forces you into reference semantics, though.

No it doesn’t. A struct member of a struct is still a value. If you put a common class instance in a struct, that would be reference semantics.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170311/db821135/attachment.html>

More information about the swift-users mailing list