<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I think the ship has sailed on "Swift code generally has few side effects". Computed properties already imply there may be arbitrary computation behind property access. And if you mean "side effects" in the mutation / IO sense, I don't think this is any worse than what we already have. Swift does not pretend to be a <a href="https://en.wikipedia.org/wiki/Purely_functional" class="">pure</a> language.</div><div class=""><br class=""></div><div class="">As to 'let' specifically, this actually has semantic effects: a property marked as 'let' will never change its value over its lifetime, enabling certain optimizations. On the other hand, as someone else pointed out on another thread, if the behavior for a 'let' property required mutation (say, for non-boxed lazy initialization), you'd be in trouble, since you can't modify the containing value.</div><div class=""><br class=""></div><div class="">Jordan</div><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 17, 2015, at 16:46 , Berik Visschers via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class="">Property behaviors would allow for much more then two-phase init and flexibility on lazy. Libraries (standard or custom) would gain declarative ways of providing deep integration in other types; And, although that can be really cool, it also worries me. I'll exaggerate to make a point:<br class=""><br class="">person.name = "Berik" // animates a UILabel update, updates a database record, sends an HTTP PUT, and, oh right; it does not update the name property. <br class=""><br class="">This kind of side effects are possible with dynamic setters already, but property behaviors allow them to become more common. The fact that swift code generally has few side affects is a great feature. I'm basically asking for careful consideration. <br class=""><br class="">Allowing "let" properties to be dynamic seems counter intuitive to me. On the one hand, using "var" for a two-phase initialized constant property is ugly, but allowing "let" variables to change over time seems too much of a sacrifice of consistency. <br class=""><br class="">Berik<br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></div></blockquote></div><br class=""></body></html>