Is this function pure?

0ffh spam at frankhirsch.net
Tue Sep 18 12:49:52 PDT 2007


Nathan Reed wrote:
> Exception throwing and catching is deterministic too as long as the 
> condition that generates the exception is (which dividing by zero would 
> be).  I think it is perfectly reasonable to allow pure functions to 
> throw and catch exceptions.

We might even want go all the way, and *require* a pure function to throw
an exception if it detects that functional purity has been compromised
like in Janice's out-of-memory example.

Regards, frank



More information about the Digitalmars-d mailing list