On 07/01/14 13:37, qznc wrote:
I would consider this weakly pure, because the implicit parameter "this" is not
immutable. A strongly pure PRNG cannot change internal state.

Related -- the work I've been doing on an updated std.random:
https://github.com/WebDrake/std.random2/blob/master/std/random2/generator.d

It's easy to make class-based PRNGs weakly pure and const (i.e. pure in everything bar perhaps some of the seed functions, const apart from seed functions and popFront). I don't think it'd meed the criteria of a very strict functional-programming interpretation of purity, though.

Reply via email to