To help LDC/GDC

John Colvin john.loughran.colvin at gmail.com
Tue Apr 9 08:52:35 PDT 2013


On Tuesday, 9 April 2013 at 15:42:38 UTC, Dicebot wrote:
> On Tuesday, 9 April 2013 at 15:20:48 UTC, Andrei Alexandrescu 
> wrote:
>>> Not gonna argue latter but former is just wrong.
>>>
>>> struct Test
>>> {
>>> int a;
>>> pure int foo1() // strong pure
>>> {
>>> return 42;
>>> }
>>>
>>> pure int foo2() // weak pure
>>> {
>>> return a++;
>>> }
>>> }
>>>
>>> Signature is the same for both functions.
>>
>> Both are weakly pure.
>>
>> Andrei
>
> And that is even more surprising as foo2 perfectly matches 
> concept of pure

Don't you mean foo1? I have no idea what i'm talking about but 
foo1 looks a lot more pure than foo2 to me.


More information about the Digitalmars-d mailing list