[swift-evolution] ability to derive a class from a struct or other value type
Mike Kluev
mike.kluev at gmail.com
Fri Jun 23 17:59:13 CDT 2017
On 23 June 2017 at 23:18, Tony Allevato <tony.allevato at gmail.com> wrote:
class C1: C2 ==> C1() is C2 == true
> class C1: P ==> C1() is P == true
> class C1: S ==> C1() is S == false?
>
ok. changing the rule then:
C() is S == true
foo(x) acts the same way as foo(x.super)
bar(&x) acts the same way as bar(&x.super)
i am not quite sure i am getting the answers along the lines of "use
protocol forwarding" instead. i have no protocol to begin with. for a
preexisting value type (e.g. OS provided) it would be a nightmare to create
and maintain the corresponding protocol.
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170624/3c557eaa/attachment.html>
More information about the swift-evolution
mailing list