Improvement in pure functions specification

Observer via Digitalmars-d digitalmars-d at puremagic.com
Fri Dec 23 06:12:54 PST 2016


On Friday, 23 December 2016 at 11:11:09 UTC, Jonathan M Davis 
wrote:
> Conceptually, it makes no sense to be doing any of that sort of 
> thing in a strongly pure function, because at that point, we're 
> really talking functional purity.

I understand your points.  I had been thinking about purity purely
from the standpoint of external mutation, since that's what the 
TDPL
discussion emphasizes, and neglected to consider possible compiler
optimizations (hoisting calls out of loops, for instance).  That
sort of thing would definitely mess with all of the examples I had
proposed.


More information about the Digitalmars-d mailing list