<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><span></span></div><div><div></div><div><br></div><div>Am 19.02.2016 um 06:01 schrieb Curt Clifton via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt;:<br><br></div><blockquote type="cite"><div><div><blockquote type="cite" class=""><div class="">On Feb 18, 2016, at 6:56 PM, Joe Groff via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Based on review feedback, I've revised the declaration syntax proposal for property behaviors to be more in line with our other declaration forms, reverting to the earlier pre-review "var behavior" proposal. I've updated the proposal in swift-evolution:<div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0030-property-behavior-decls.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0030-property-behavior-decls.md</a></div></blockquote></div></div></blockquote><div><br class=""></div><div>The updated behavior declaration form is largely an improvement.&nbsp;</div></div></div></blockquote><div><br></div>Yes, I prefer it as well.<div><br><blockquote type="cite"><div><div><div>With the placeholder for binding the name of the attributed property gone from the grammar, I wonder if you’ve given any thought to how that binding might be done. I recognize that the binding is left for future work, but would hate to see my pet feature painted into a corner.</div><div><br class=""></div><div>I find the naked `initialValue` “declaration" quite odd. It’s not exactly a declaration </div></div></div></blockquote><div><br></div>This might be an editing problem with th examples. In the Proposed Solution the syntax is</div><div><br></div><div>public var behavior lazy&lt;Value&gt; = initialValue { ... }</div><div><br></div><div>which makes sense to me (though it is missing the type declaration (: Value) here.</div><div><br></div><div><br><blockquote type="cite"><div><div><div>even. What are the implications for parsing? If we’re already willing to special case`initialValue` in the parser in this context, perhaps we could introduce a binding list instead, like:</div><div><br class=""></div><div>```</div><div><div>public var behavior lazy&lt;Value&gt;: Value {</div><div>&nbsp; // Behaviors can bind the property's initializer expression with a</div><div>&nbsp; // binding declaration.</div><div>&nbsp; bind initialValue</div><div>&nbsp; …</div></div><div>```</div><div>Besides eliminating the odd naked “declaration”, this has&nbsp;the added advantage that it could be extended to `bind initialValue, propertyName`. :-)</div></div></div></blockquote><div><br></div><div>Couldn't we just add a name by introducing an accessor to be implemented by the user of a property?</div><div>Alternatively the syntax could be extended to</div><div><br></div><div>public var behavior(name: String) lazy&lt;Value&gt;...</div><div><br></div><div>but I don't think that is necessary.</div><div><br></div><div>-Thorsten&nbsp;</div><div><br></div></div></div></body></html>