Re: Effect of declaring a class immutable ?

2016-05-26 Thread Basile B. via Digitalmars-d-learn
On Thursday, 26 May 2016 at 14:12:23 UTC, chmike wrote: I couldn't find any information about this on the dlang web site. What is the effect adding the immutable attribute to a class like this immutable class MyClass { ... } The compiler doesn't complain. Will it add the immutable attribute

Re: Effect of declaring a class immutable ?

2016-05-26 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, May 26, 2016 14:12:23 chmike via Digitalmars-d-learn wrote: > I couldn't find any information about this on the dlang web site. > > What is the effect adding the immutable attribute to a class like > this > > immutable class MyClass { ... } > > The compiler doesn't complain. > Will it

Re: Effect of declaring a class immutable ?

2016-05-26 Thread ArturG via Digitalmars-d-learn
On Thursday, 26 May 2016 at 14:12:23 UTC, chmike wrote: I couldn't find any information about this on the dlang web site. What is the effect adding the immutable attribute to a class like this immutable class MyClass { ... } The compiler doesn't complain. Will it add the immutable attribute

Effect of declaring a class immutable ?

2016-05-26 Thread chmike via Digitalmars-d-learn
I couldn't find any information about this on the dlang web site. What is the effect adding the immutable attribute to a class like this immutable class MyClass { ... } The compiler doesn't complain. Will it add the immutable attribute to all members ?