GC.addRange in pure function

Paul Backus snarwin at gmail.com
Tue Feb 9 21:00:39 UTC 2021


On Tuesday, 9 February 2021 at 20:50:12 UTC, Max Haughton wrote:
> On Tuesday, 9 February 2021 at 19:53:27 UTC, Temtaime wrote:
>> On Sunday, 7 February 2021 at 14:13:18 UTC, vitamin wrote:
>>> Why using 'new' is allowed in pure functions but calling 
>>> GC.addRange or GC.removeRange isn't allowed?
>>
>> pure is broken. Just don't [use it]
>
>
> [Citation needed]

Allowing memory allocation in pure code in a language that can 
distinguish between pointer equality and value equality is, let's 
say, "unprincipled."


More information about the Digitalmars-d-learn mailing list