Store mutable indirections in immutable data with this one weird trick!
Imperatorn
johan_forsberg_86 at hotmail.com
Sat Nov 13 16:57:47 UTC 2021
On Saturday, 13 November 2021 at 14:43:00 UTC, Paul Backus wrote:
> On Saturday, 13 November 2021 at 14:35:36 UTC, Imperatorn wrote:
>> On Saturday, 13 November 2021 at 14:32:15 UTC, Paul Backus
>> wrote:
>>> On Saturday, 13 November 2021 at 13:11:05 UTC, Timon Gehr
>>> wrote:
>>>> [...]
>>>
>>> In a language where valid programs cannot distinguish between
>>> different pointers to the same value, or observe the side
>>> effects of memory allocation, it is natural to define `pure`
>>> such that it allows memory allocation.
>>>
>>> [...]
>>
>> Many use the "compromise edition" to pure, I think it's ok.
>> Pure in that sense is just same out for a given in, doesn't
>> matter what the function does inside.
>
> [`pureMalloc`][1] does not return the same output for a given
> input.
>
> [1]: https://druntime.dpldocs.info/core.memory.pureMalloc.html
Yeah, these words are not precise enough.
More information about the Digitalmars-d
mailing list