On Wednesday, 3 February 2016 at 11:38:06 UTC, Bambi wrote:
Immutable accomplishes nothing distinct here that I can see, other than making the use of const confusing. To make a function not change a value you declare a const input.

Immutablity provides stronger guarantee that allows more optimizations, e.g. reading the same immutable value is known to result in the same value so such repeated reading can be optimized out, in C such optimization is illegal, because const data can change over time.

Reply via email to