[swift-evolution] [Review] SE-0030 Property Behaviors
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...
More information about the swift-evolution