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

2017-01-18 Thread Matthew Johnson via swift-evolution
> On Jan 18, 2017, at 10:54 AM, Joe Groff via swift-evolution > wrote: > > >> On Jan 18, 2017, at 8:50 AM, Tony Allevato 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 m

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

2017-01-18 Thread Adrian Zubarev via swift-evolution
Yeah I’m looking for that day too. :) class ImmutableThing : AnyValue { … } --  Adrian Zubarev Sent with Airmail Am 18. Januar 2017 um 18:03:59, Matthew Johnson via swift-evolution (swift-evolution@swift.org) schrieb: On Jan 18, 2017, at 11:00 AM, Joe Groff wrote: On Jan 18, 2017, at 8:57

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

2017-01-18 Thread Matthew Johnson via swift-evolution
> On Jan 18, 2017, at 11:00 AM, Joe Groff wrote: > >> >> On Jan 18, 2017, at 8:57 AM, Matthew Johnson wrote: >> >> >>> On Jan 18, 2017, at 10:54 AM, Joe Groff via swift-evolution >>> wrote: >>> >>> On Jan 18, 2017, at 8:50 AM, Tony Allevato wrote: Good point—I hadn't con

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

2017-01-18 Thread Joe Groff via swift-evolution
> On Jan 18, 2017, at 8:57 AM, Matthew Johnson wrote: > > >> On Jan 18, 2017, at 10:54 AM, Joe Groff via swift-evolution >> wrote: >> >> >>> On Jan 18, 2017, at 8:50 AM, Tony Allevato wrote: >>> >>> Good point—I hadn't considered the distinction. >>> >>> Does that mean a future version o

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

2017-01-18 Thread Tony Allevato via swift-evolution
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? On Wed, Jan 18, 2017 at 8:48 AM Joe Groff wrote: > >

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

2017-01-18 Thread Joe Groff via swift-evolution
> On Jan 18, 2017, at 8:50 AM, Tony Allevato 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

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

2017-01-18 Thread Tony Allevato via swift-evolution
Personally, I don't feel that the problem is big enough to warrant a breaking change here. `var` is the general property declaration keyword in Swift for read-write stored properties and read-only/read-write computed properties. The fact that you can use `let` in place of `var` under one specific

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

2017-01-18 Thread Joe Groff via swift-evolution
> On Jan 18, 2017, at 8:41 AM, Tony Allevato via swift-evolution > wrote: > > Personally, I don't feel that the problem is big enough to warrant a breaking > change here. > > `var` is the general property declaration keyword in Swift for read-write > stored properties and read-only/read-writ

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

2017-01-18 Thread Jeremy Pereira via swift-evolution
> On 18 Jan 2017, at 05:38, Vinnie Hesener via swift-evolution > wrote: > > The var keyword in protocol property requirements is misleading. > > From the docs: > *If a protocol requires a property to be gettable and settable, that property > requirement cannot be fulfilled by a constant stor

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

2017-01-17 Thread Vinnie Hesener via swift-evolution
The var keyword in protocol property requirements is misleading. >From the docs: *If a protocol requires a property to be gettable and settable, that property requirement cannot be fulfilled by a constant stored property or a read-only computed property. If the protocol only requires a property to