How do you properly use immutable on class members?

2022-03-29 Thread Fruitful Approach via Digitalmars-d-learn
I have immutable members: `immutable immutable(Prop)[] axioms` which I can't initialize with Prop[], so I call this "immutable-poisoning" of the rest of my code. Can you provide a 10 line example of how to best work with immutable types, specifically immutable members, together with ctor, an

Re: How do you properly use immutable on class members?

2022-03-29 Thread Fruitful Approach via Digitalmars-d-learn
On Tuesday, 29 March 2022 at 18:59:41 UTC, H. S. Teoh wrote: On Tue, Mar 29, 2022 at 05:58:11PM +, 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