[Issue 1983] Delegates violate const

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 23 23:15:58 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=1983

--- Comment #31 from Bolpat <qs.il.paperinik at gmail.com> ---
(In reply to timon.gehr from comment #30)
> (In reply to Bolpat from comment #28)
> > However, I make myself aware that this is an implementation detail and in
> > principle, other implementations are possible where the context pointer
> > is not actually part of the delegate object but externalized to a global
> > associative array.
> 
> Sorry, but this falls flat on its face because a `pure` function cannot
> access a mutable global associative array. The context pointer is indeed
> part of the delegate.

My AA externalization code was to convey an idea, not to propose an
implementation. It was to help people visualize how contexts could be not part
of  the delegate object. I was well aware about that limitation.

--


More information about the Digitalmars-d-bugs mailing list