Memory allocation purity

via Digitalmars-d digitalmars-d at puremagic.com
Thu May 15 22:40:14 PDT 2014


On Thursday, 15 May 2014 at 13:42:58 UTC, Steven Schveighoffer 
wrote:
> In any case, the alternative is to have D pure functions avoid 
> using pointers. It's as drastic as that.

You need:

1. references with value semantics.

2. "non pure exceptions" that cannot be caught within a pure 
chain, but can be caught outside

Besides that I think programmer provided guarantees for 
referential transparency are valuable for C/ASM and for non-pure 
to pure conversion using the exception in point 2.


More information about the Digitalmars-d mailing list