Re: [swift-evolution] constant var

2017-12-14 Thread Inder Kumar Rathore . via swift-evolution
s } } On Tue, Dec 12, 2017 at 10:28 PM, Joe Groff wrote: > > > > On Dec 11, 2017, at 11:34 PM, Inder Kumar Rathore . via swift-evolution < > swift-evolution@swift.org> wrote: > > > > Hi All, > > Today I was writing code and faced a situation where I need to

Re: [swift-evolution] constant var

2017-12-12 Thread Inder Kumar Rathore . via swift-evolution
declaration. > On Mon, Dec 11, 2017 at 11:34 PM Inder Kumar Rathore . via swift-evolution > wrote: > >> Hi All, >> Today I was writing code and faced a situation where I need to make a >> instance variable a const i.e. it shouldn't accept new values from anywhere >&

[swift-evolution] constant var

2017-12-11 Thread Inder Kumar Rathore . via swift-evolution
Hi All, Today I was writing code and faced a situation where I need to make a instance variable a const i.e. it shouldn't accept new values from anywhere but the problem is that I want it's content to be mutable. e.g. class MyClass { var myDict = [String : String]() } I want above variable to