Memory allocation purity

via Digitalmars-d digitalmars-d at puremagic.com
Mon May 19 10:31:08 PDT 2014


On Monday, 19 May 2014 at 17:11:43 UTC, Steven Schveighoffer 
wrote:
> It shouldn't matter. Something that returns immutable 
> references, can return that same thing again if asked the same 
> way. Nobody should be looking at the address in any meaningful 
> way.

I think this is at odds with generic programming. What you are 
saying is that if you plug a pure function into an algorithm then 
you have to test for "pure" in the algorithm if it is affected by 
object identity. Otherwise, goodbye plug-n-play.


More information about the Digitalmars-d mailing list