<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">In favor of them being just functions (even if they were declared as part of a class/struct/whatever)…</div><div class=""><br class=""></div><div class="">Isn’t there a proposal for a function composition operator floating around? I think it was “•” (option-8)… Anyway, assume that’s what I mean by “•”.</div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><span style="font-family: Menlo; font-size: 11px; color: rgb(187, 44, 162);" class="">var</span><font face="Menlo" class=""><span style="font-size: 11px;" class="">&nbsp;&lt;</span></font><font color="#31595d" face="Menlo" class=""><span style="font-size: 11px;" class="">lazy•resettable•changeObserved</span></font><font face="Menlo" class=""><span style="font-size: 11px;" class="">&gt; foo:&nbsp;</span></font><span style="color: rgb(112, 61, 170); font-family: Menlo; font-size: 11px;" class="">Int</span><font face="Menlo" class=""><span style="font-size: 11px;" class="">&nbsp;= {…}</span></font></div></blockquote><div class=""><br class=""></div><div class="">Plus, it’d make the order in which they were applied obvious.</div><blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px;" class=""></blockquote><div class=""><br class=""></div><div class="">Actually, speaking of using functions that were declared as part of an object… Could this all be done now by introducing an Observable&lt;T&gt; struct which itself uses the existing will/didSet functions? Like this?&nbsp;<span class="Apple-tab-span" style="white-space: pre;">        </span></div><blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px;" class=""><span style="font-family: Menlo; font-size: 11px; color: rgb(187, 44, 162);" class="">var</span><font face="Menlo" class=""><span style="font-size: 11px;" class="">&nbsp;foo =&nbsp;</span></font><span style="color: rgb(112, 61, 170); font-family: Menlo; font-size: 11px;" class="">Observable</span><span style="font-family: Menlo; font-size: 11px;" class="">(</span><span style="font-family: Menlo; font-size: 11px; color: rgb(39, 42, 216);" class="">3</span><span style="font-family: Menlo; font-size: 11px;" class="">,&nbsp;</span><span style="color: rgb(49, 89, 93); font-family: Menlo; font-size: 11px;" class="">lazy•resettable•changeObserved</span><span style="font-size: 11px; font-family: Menlo;" class="">)</span></blockquote><div class=""><br class=""></div><div class="">I <i class="">think</i> the only thing off the top of my head that wouldn’t pretty much Just Work is automatically converting between Observable&lt;T&gt; and T, the way you can with Implicitly Unwrapped Optionals. I might play with it a bit tonight after dinner.</div><div class=""><br class=""></div><div class="">
- Dave Sweeris

</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Jan 14, 2016, at 14:05, Joe Groff via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></div></blockquote><blockquote type="cite" class=""><br class=""></blockquote><blockquote type="cite" class=""><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="">If behaviors have dedicated declarations instead of being applications of plain types or functions, it also becomes more reasonable to let them be used as attributes by themselves</div></div></div></blockquote></div></body></html>