To help LDC/GDC

deadalnix deadalnix at gmail.com
Wed Apr 10 17:33:54 PDT 2013


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).


More information about the Digitalmars-d mailing list