[swift-evolution] Thoughts on property behavior out-of-band members

Sean Heber sean at fifthace.com
Fri Feb 19 09:25:54 CST 2016


> If we're going to use an `@runcible` syntax for properties, we should think about what will happen to behavior members.
> 
> The basic syntax itself is simple enough; `foo at runcible` and `foo. at runcible` are both reasonable options. (I slightly favor the dotless version because it doesn't make it look like you could capture `foo` in a variable and access `@runcible` from it, but that's a minor issue.)

A quick thought I had while reading this is what if the access syntax looked like this:

@resetable(foo).reset()
@runcible(spoon).finish = Material.silver

I think that would read pretty well - as if you’re accessing something that “wraps” the target var (which, basically, you are).

l8r
Sean



More information about the swift-evolution mailing list