What can _not_ be marked pure?

Guillaume Piolat via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Mar 9 05:35:11 PST 2016


On Wednesday, 9 March 2016 at 13:12:18 UTC, Jonathan M Davis 
wrote:
>
> In general though, you should use pure wherever possible.
>
> - Jonathan M Davis

Thanks for the detailed answer and gotchas.
It thought compilers would use pure in alias analysis to ensure 
everything did not mutate during a pure function call.

This topic is much more involved than it first seemed!

Reminds me of the quote: "I have yet to see any problem, however 
complicated, which, when you looked at it in the right way, did 
not become still more complicated."




More information about the Digitalmars-d-learn mailing list