True story, if you’re doing something heavy and there are tons of calls from your observed property you’d pay with a huge performance decrease. Personally I don’t feel like this would be something that stays in the way of having this handy feature, because it’s always up to us to balance the performance of our application.
-- Adrian Zubarev Sent with Airmail Am 8. Juli 2016 um 13:44:45, Tino Heth ([email protected]) schrieb: There are (were?) plans for generalized property behaviors; those would be used to implement lazy, as well as didSet/willSet, and could incorporate many other things (including injection) Of course, an option to observe variables would be handy — but there's always a price to pay, and you'll at least need a way to opt-out: Even if you actually don't observe a property that changes hundreds of times per second, the hooks alone could degrade performance (it's another question if it's wise to have such properties ;-) Tino
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
