[swift-evolution] [Review] SE-0030 Property Behaviors

Tino Heth 2th at gmx.de
Sun Feb 14 16:15:31 CST 2016


> The main shortcoming here is the complete lack of composability. I understand why behavior composition got cut, but I’m not convinced it was the right decision.
I agree that a deliberate solution should include composition of behaviors, but I doubt that the practical value of this feature is big:
Most likely, there won't be many different behaviors, and I expect that each of those will be small (in terms of code size). Both assumptions may be wrong in some cases, but all examples that have been discussed so far could easily be combined by simply writing a new behavior.

This isn't elegant, but without a clear distinction between "decorating" behaviors and those that provide actual storage, many possible combinations would make no sense at all (that's no argument against composition, though)

Tino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160214/cda1daa4/attachment.html>


More information about the swift-evolution mailing list