<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><blockquote type="cite" class=""><div class=""><div class=""><blockquote class=""><div class="">A behavior declaration<br class=""></div>
</blockquote><div class="">&nbsp;</div>
<div class="">This has promise as well. By using a declaration like this, you can have basically a DSL (using contextual keywords) to specify things like whether it's lazy-initialized, decorators, and transformers. Same benefits as the protocol family (e.g. good compiler checking of the behavior definition before it's even used anywhere), allows for code code-completion too, and it doesn't litter the global function namespace with behavior names.<br class=""></div>
<div class="">&nbsp;</div>
<div class="">The more I think about this, the more I think it's a good idea. Especially because it won't litter the global function namespace with behavior names. Behavior constructors should not be callable by the user, and behaviors may be named things we would love to use as function names anyway (if a behavior implements some functionality that is useful to be exposed to the user anyway, it can vend a type like your proposal has and people can just instantiate that type directly).<br class=""></div>
<div class="">&nbsp;</div></div></div></blockquote><br class=""></div><div>+1 to these comments. &nbsp;I think this option should at least be fleshed out further and receive serious consideration.</div></body></html>