To help LDC/GDC

deadalnix deadalnix at gmail.com
Tue Apr 9 18:36:08 PDT 2013


On Tuesday, 9 April 2013 at 16:55:07 UTC, Simen Kjaeraas wrote:
> On 2013-04-09, 18:46, Manu wrote:
>
>> What is an immutable function? Why is const not sufficient?
>
> Immutable requires that the struct/class be immutable, const
> may be called on mutable instances. Thus, the object may be
> changed in a different thread while the const function executes.
> Not so with immutable.

Not in other thread (as it would require to be shared or is 
undefined behavior) but vie delegate for instance.


More information about the Digitalmars-d mailing list