[swift-evolution] [pitch] Implementation composition
Jay Abbott
jay at abbott.me.uk
Fri Nov 25 10:31:21 CST 2016
Tino,
In what way is this “hiding” protocol conformance? In the examples, MyClass
is declaring conformance to A and B via the Useful protocol composition.
Perhaps I should have made it clearer which bits are new/proposed: Only the
implements word is new here, the protocol composition syntax (A & B)
already exists.
You’re probably right that this is an additive (4.1) thing. But personally
I see no harm in building up a backlog of useful proposals to be reviewed
next year. The knowledge of what’s to come may also help influence thinking
on what’s to come next. Should such discussions be flagged as additive in
the subject somehow? I think I asked this before but forgot or missed if
there was a response.
On Fri, 25 Nov 2016 at 16:21 Tino Heth <2th at gmx.de> wrote:
Kotlin has a imho really nice solution for this: Because constructor
parameters appear right after the class declaration, you can refer to them
in the inheritance-clause.
Protocol conformance is a quite important aspect of a type, so I'm not sure
if it wise to allow "hiding" it — and I hope the promised macro-system will
allow forwarding, so that there is no special syntax needed.
Bottom line:
Imho it's not the right time for serious discussion (serious means: with
the goal of a accepted proposal ;-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161125/b495e3d9/attachment.html>
More information about the swift-evolution
mailing list