Proposal: Relax rules for 'pure'

Kagamin spam at here.lot
Tue Sep 21 23:31:02 PDT 2010


Technically this is feasible, but I don't think that it's a good idea to surprise user with impurity of pure function.

> This is extremely restrictive, and not currently enforced.
> Two specific limitations:
> - a 'pure' member function doesn't really make sense (could only be 
> called on an immutable class)
> - a pure function cannot have 'out' parameters.

If you can't use purity, don't use it, impure functions work just fine.


More information about the Digitalmars-d mailing list