Rebooting the __metada/__mutable discussion

rikki cattermole rikki at cattermole.co.nz
Thu Apr 7 17:40:23 UTC 2022


On 07/04/2022 8:51 PM, RazvanN wrote:
> I think that the problem here is that we are conflating a high-level 
> concept (purity) with low level operations (allocation/deallocation). 
> The latter category is essentially not pure because it modifies 
> operating system data structures, so I would say that we could view them 
> as system code, not in the sense that they are unsafe (although they 
> could be), but because they require OS assistance.

I've had to argue with myself on if memory mapping should be viewed as 
pure or not. During development of my own allocators.

Ultimately the argument I came up with is that we have already defined 
memory mapping in the form of new as being pure. I disagree that it 
should be defined as such, but it has been.

As such I have classified memory mapping as being a set of "deity" 
functions. Things that modify the execution environment but not the 
logic being executed therefore can be considered pure.


More information about the Digitalmars-d mailing list