Improvement in pure functions specification

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Thu Dec 22 23:29:49 PST 2016


On Friday, 23 December 2016 at 06:53:25 UTC, Observer wrote:
[ ... ]

A pure function MUST NOT mutate any state except what is 
reachable through it's arguments.
This includes ANY operating system state.

As for your debugger point.
You can break on a pure function as well as on any other.
And, yes that breakpoint can be shifted or invalided by compiler 
optimizations.
That is why there are debug builds for which the compiler avoids 
most optimizations.


More information about the Digitalmars-d mailing list