Pitch: Property Delegates

If it was a key-path after by I would argue that we need it. Also if it wasn't a key-path you can get the impression that you can call methods with your syntax.

public var name by _data.getName(at: Index(0)) {}

Key-Paths don't support methods yet, and it's not clear how that would behave when we get the support.


The {} is datable. I left it there to signal that this is a computed property, compiler please infer get and set for me. Also you can override the synthetization anytime. ;)

This solution clearly has its trade-offs compared the synthetize it all behavior of the proposal, but it's by far more flexible, already statically safe, we don't lose access to self as the storage at the end of the key-path can still be lazy.

The first idea of this I had here:

Whatever storage types we create should be up to us and not restricted by any language attribute.