[swift-evolution] Removing var keyword in protocol property reqirements

Joe Groff jgroff at apple.com
Wed Jan 18 10:54:13 CST 2017

> On Jan 18, 2017, at 8:50 AM, Tony Allevato <tony.allevato at gmail.com> wrote:
> Good point—I hadn't considered the distinction.
> Does that mean a future version of Swift might allow `let` in a protocol to indicate a value that must be immutable after initialization, such that a computed `var { get }` wouldn't satisfy it?

It's conceivable that even computed `let` properties could be supported, if the getter implementation is a pure function of `self`.


More information about the swift-evolution mailing list