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

Howard Lovatt howard.lovatt at gmail.com
Sat Feb 20 01:21:59 CST 2016


+1 for both the revised proposal and Austin's comments re @ and #. I was
giving a talk about Swift Evolution at the local Cocoa Heads meet up and a
question from the floor was what was the difference between @ and #? I
foundered a bit answering the question which shows I don't know the answer.
So clarity would be good for me.

On Friday, 19 February 2016, 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.
>


-- 
-- Howard.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160220/6f373907/attachment.html>


More information about the swift-evolution mailing list