Scala uses their equivalent of let ... instead of var ... { get }. In Scala
let ... Always means var ... { get }. Not a problem in Scala only having
one concept. I think it is a possibility for Swift.
···
On Saturday, 30 January 2016, Brent Royal-Gordon via swift-evolution < swift-evolution@swift.org> wrote:
> So what about protocols requiring ‘var … { get }’ syntax for read only
properties? Is there some sort of underlying reason for this confusing
syntax instead of ‘let …’? Now that Swift allows deferred initialization of
lets does this requirement make sense?`let` doesn't mean "no setter", it means "constant". For instance, you
can't make a `weak let`, because the `weak` implies the variable can be
nilled. There's no way to require a constant in a protocol, but if there
were one, that's what `let ...` would mean.--
Brent Royal-Gordon
Architechies_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org <javascript:;>
https://lists.swift.org/mailman/listinfo/swift-evolution
--
-- Howard.