Implementing Pure Functions
    Kagamin 
    spam at here.lot
       
    Thu Jun 16 23:56:21 PDT 2011
    
    
  
Andrei Alexandrescu Wrote:
> This has sparked an interesting discussion, to which I added my bit.
int fun(int a) pure { if (a > 10) writeln("I'm impure); }
As I understand, even if some calls to a function have some repeatability properties, this doesn't mean the function is pure. In this example fun is obviously impure. Here one can talk about allowing to call impure functions from pure ones, but that's a way different task.
    
    
More information about the Digitalmars-d
mailing list