With functions we read left to right with the value passing onward. With properties the code block is being push back into its declaration, or right to left: the value flows back toward var
.
To me it would be:
throws async var asyncProperty: Bool {/* */}
I think new syntax would be required in order to maintain the ascetic ordering the async/await proposal declared. Perhaps introducing a function arrow for var.
var asyncProperty async throws -> Bool {/* */}
But then why not just make it a function? And thats where I’m at. It should just be a function. The proposal also suggests setters could get keywords too which means a var
could have 2 completely different meanings for setting and getting.
I realize the new concurrency proposals make asynchronous code simple and easy, and that opens the door for this proposal; but I’m not seeing the benefit. The proposal doesn't explain what we’re fixing or making better. It’s just that it’s possible now, with the new concurrency model, and I don't think thats a good reason to make properties complex like this.
But again, I do appreciate the approach taken. Its a clean and enjoyable solution. If this was somehow required, I’d be happy with it; but i just don't think it’s the right thing for properties.