<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Feb 18, 2016 at 6:56 PM, Joe Groff via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">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><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0030-property-behavior-decls.md" target="_blank">https://github.com/apple/swift-evolution/blob/master/proposals/0030-property-behavior-decls.md</a></div><div><br></div></blockquote>In discussion with the core team, we've also strongly come in favor of applying behaviors to properties using attribute syntax, e.g.:<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>@lazy var x = 111</div><div>@delayed var x: Int</div><div><br></div></blockquote>They're definitely attribute-like, and we think it makes sense for behaviors to be the first of hopefully many kinds of user-defined behaviors. What do you all think of this direction?<div><br></div><div>-Joe</div></div></blockquote><div><br></div><div>I think this is a good direction, however I'm concerned about possible namespace conflicts here. Does user code break if someone defines an attribute which becomes part of the standard library in a future Swift version? Can multiple modules declare attributes with the same name? Maybe they can be qualified as "@MyModule.lazy var x" — although this would also conflict with syntax like "x.@lazy.foo" (is this a "lazy" attribute or a "foo" attribute in a "lazy" module?).</div><div><br></div><div>Jacob</div></div></div></div>