<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>I like the idea behind using protocols for behaviors, but the more I think about it, the more I'm not in love with the way it is invoked. Having to use dot syntax every time doesn't feel right. When it comes to the having to use .clear(), that really doesn't feel right. Setting value to nil seemed so much cleaner and simpler.&nbsp;</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">Also, why can't we apply the behaviors described but keep the keyword where it is.&nbsp;</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">lazy var foo: Int</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">You would t have change so much code, it's familiar and I like the the keyword lazy seems to be modifying the var when it typed before it. It's acting like and adjective. Essentially, that's what the behavior protocols are doing--describing the behavior of a given property and acting like an adjective.&nbsp;</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">Does anyone else feel the same on these points?</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">Myles</div><div id="AppleMailSignature"><br>Sent from my iPhone</div><div><br>On Feb 11, 2016, at 4:40 PM, Trent Nadeau via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">From what I've seen @ is used for annotations, which apply to declarations. I've never seen them used as an attribute like <font face="monospace, monospace">foo.@bar</font>.<div><br></div><div><font face="monospace, monospace">foo.#behavior(lazy).clear()</font> seems clearer than <font face="monospace, monospace">foo.[lazy].clear()</font>.<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 11, 2016 at 4:36 PM, Brent Royal-Gordon <span dir="ltr">&lt;<a href="mailto:brent@architechies.com" target="_blank">brent@architechies.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span>&gt; Where [lazy] is currently used, could the syntax instead be #behavior(lazy)? That prevents a possible future naming clash, keeps the # meaning compiler-magic, and doesn't use the [], which is contentious.<br>
<br>
</span>I think that if we go down this road, @behavior(lazy) or just @lazy is strictly superior. We already have the @ sigil for attributes; we don't need to introduce another sigil for no apparent reason.<br>
<br>
(But unless we're going to use the latter syntax and say "all @s are behaviors, we just haven't formalized func/type/etc. behaviors yet" so we finally have an idea of what @ means, I don't think either of these syntaxes is better than the one proposed.)<br>
<span><font color="#888888"><br>
--<br>
Brent Royal-Gordon<br>
Architechies<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Trent Nadeau</div>
</div></div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></body></html>