Proposal: Relax rules for 'pure'

Jason House jason.james.house at gmail.com
Wed Sep 22 16:10:45 PDT 2010


Walter Bright Wrote:
> A pure function also cannot modify any data via its parameters. In other words, 
> its parameters must be transitively const.

A weakly pure function should be able to take mutable inputs and modify them. When called from a strongly pure function, the mutable data can only be local variables. 


More information about the Digitalmars-d mailing list