Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Property composition operators. #2922
A subset of #2911.
The signals and producers of
would be alive as long as
The producer and the signal of the resulting property of
This branch includes a change to the lifetime of the producers and signals of the transformed properties, as suggested by @mdiep. They now respect the lifetime of the ultimate source, instead of the internal relaying property.
Moreover, intermediate properties in a chain would not be retained but only the ultimate source, so that their internal relaying
What's the motivation for this?
What's the motivation for this? Can we break it out into a separate PR?
What are the breaking changes? The changes to property lifetimes?
This is impossible to express in Swift 2.x using the current closure approach due to the limitation of
Using a box also reduces the number of retains when passing/copying an
Sure. For the motivation, as written in the preceding PR:
AnyMutableProperty is introduced for users who would like to build higher level constructs that operate on the MutablePropertyType abstraction. An example would be two-way bindings between two MutablePropertyTypes without knowing the concrete type.
The lifetime of transformed property - currently only
That's great—thank you! Smaller PRs are much easier to review. I'm happy to consider those other changes in a separate PR; I was trying to figure out how they related to the property composition operators.
Yes, I'd be interested in that. It seems like the breaking changes were unrelated to property composition.