On Monday, 22 December 2014 at 21:52:12 UTC, ketmar via Digitalmars-d wrote:
Thanks, I forgot that one. Immutable values by default is indeed an important improvement. All by-value parameters to functions should be immutable, period.

but why? O_O

Because it is safer in long functions where you might miss a modification of the input parameter when editing an existing function, and copying from immutable to mutable is free if the parameter is left alone after the copy.

Reply via email to