> On Aug 9, 2016, at 08:24 , Karl <razie...@gmail.com> wrote: > > >> On 3 Aug 2016, at 02:01, Rick Mann via swift-users <swift-users@swift.org> >> wrote: >> >> It complains if I make it a let because computed properties must be var. >> Because it's a protocol, it can't be stored (even though it can be stored in >> the conforming type). >> >> If I make it { get }, I can't set it in the extensions init() method. >> >> I guess I could make it private set (not sure of the syntax for that), but >> it still doesn't have let semantics. > > It sounds like you should put the calculation function in the protocol > extension, the property in the protocol, and let conforming types decide how > to store that property (and when to calculate it).
That still doesn't mean that someone on the outside looking in at Element sees let semantics. -- Rick Mann rm...@latencyzero.com _______________________________________________ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users