How do you properly use immutable on class members?

Fruitful Approach fruitfulapproach at
Tue Mar 29 22:12:51 UTC 2022

On Tuesday, 29 March 2022 at 18:59:41 UTC, H. S. Teoh wrote:
> On Tue, Mar 29, 2022 at 05:58:11PM +0000, Fruitful Approach via 
> Digitalmars-d-learn wrote:
>> [...]
> 1) `immutable immutable(Prop)[]` is identical to 
> `immutable(Prop[])`.
>    Immutable is transitive. There is no need to spell it in 
> such a
>    verbose way.
> [...]

Thank you thank you thank you!  You've more than answered my 
concerns about using them.  So you're saying I should make my 
ctor parameters either const or `in`.  I will code some more and 
see if I can make this hurdle.

More information about the Digitalmars-d-learn mailing list