Using const to Enforce Design Decisions

Walter Bright newshound2 at digitalmars.com
Thu Mar 28 08:13:46 UTC 2019


On 3/26/2019 12:57 AM, Marco de Wild wrote:
> I've also tried to use pure, but (ironically) I found it harder to use. I think 
> it's easier to understand when an object will be mutated or not than to predict 
> whether there are side effects.

Using pure is indeed hard. One has to make a change in how one thinks about 
programming to make good use of it, it can't just be schlepped on. But the 
results can be pretty cool.

Same with const.


More information about the Digitalmars-d-announce mailing list