[swift-evolution] [Review] SE-0030 Property Behaviors

Kyle Sherman kyledsherman at gmail.com
Thu Feb 18 22:19:03 CST 2016


+1 for the changes and to what Austin said. 

Sent from my iPhone

> On Feb 18, 2016, at 8:03 PM, Austin Zheng via swift-evolution <swift-evolution at swift.org> wrote:
> 
> 
> In discussion with the core team, we've also strongly come in favor of applying behaviors to properties using attribute syntax, e.g.:
> 
> @lazy var x = 111
> @delayed var x: Int
> 
> 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?

Seems like a good idea.

It would be great if we could eventually nail down 'recommended semantics' for symbols like @, #, &, etc, and then normalize the language syntax to match. We have a couple of informal conventions emerging, but I find that (e.g.) trying to figure out why Language Feature X has a leading '@' rather than being a keyword is still rather difficult.
_______________________________________________
swift-evolution mailing list
swift-evolution at swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160218/43497b21/attachment.html>


More information about the swift-evolution mailing list