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

Joe Groff jgroff at apple.com
Mon Feb 15 16:45:10 CST 2016

On Feb 14, 2016, at 12:02 PM, plx via swift-evolution <swift-evolution at swift.org> wrote:
> As far as I have followed it, it does seem that it’s only `synchronized`-style behaviors that are fundamentally-problematic under composition; that is, using the terminology in the proposal, linear behavior composition would work fine, and to my eyes most behaviors are “linear”.

Behaviors that make synchronization promises are an obvious problem with composition, but there are also subtle issues with other compositions. Consider the composition of `lazy` with `didSet`—if you apply `didSet` inside `lazy`, you'll observe the lazy initialization as a "set" of the lazy storage, whereas you won't if you apply `lazy` inside `didSet`.

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

More information about the swift-evolution mailing list