On Wednesday, 10 April 2013 at 18:33:26 UTC, Walter Bright wrote:
On 4/9/2013 7:12 AM, Simen Kjærås wrote:
const is not sufficient, as someone else might have a mutable
reference. immutable is needed.

const is sufficient for strongly pure, because another reference is not available to the function body, and so the function cannot mutate it.

No !

A delegate reached via parameters and called can mute them.

call with const parameter can be considered strongly pure if the argument is immutable (granted we fix delegate transitivity issues).

Reply via email to