Expanding the horizons of D purity
Kenji Hara
k.hara.pg at gmail.com
Fri Nov 1 09:56:01 PDT 2013
2013/11/1 Timon Gehr <timon.gehr at gmx.ch>
> On 11/01/2013 03:21 PM, Kenji Hara wrote:
>
>>
>> The first delegate should not become pure.
>>
>
> Why not? It is weakly pure, like the following:
>
> void main(){
> struct S{
> int num;
> void member(int x)pure{ num = x; } // pure
> }
> S s;
> func(&s.member); // weakly pure function call
>
> }
>
Hmm, looks reasonable. Thanks for the good point out.
Kenji Hara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20131102/08dd8d67/attachment.html>
More information about the Digitalmars-d
mailing list