[phobos] [D-Programming-Language/phobos] 4f28db: not really pure

Walter Bright walter at digitalmars.com
Sat Jun 25 20:31:07 PDT 2011



On 6/25/2011 8:25 PM, Jonathan M Davis wrote:
> On 2011-06-25 20:23, Walter Bright wrote:
>> On 6/25/2011 8:01 PM, Jonathan M Davis wrote:
>>> If they're not really pure, they shouldn't compile with pure.
>> They won't in the upcoming checkin.
>>
>>>    Also, not being
>>>
>>> able to use opAssign in pure functions could be rather annoying. Why
>>> doesn't that work?
>> Pure functions cannot mutate data through pointers passed to them.
> Weakly pure functions are supposed to be able to.
>
>

The compiler wasn't checking this at all. It's possible we can loosen things up 
after we understand the issues better, but we should start with being very 
conservative about what purity means.


More information about the phobos mailing list