Fully transitive const is not necessary

Steven Schveighoffer schveiguy at yahoo.com
Wed Apr 2 07:04:36 PDT 2008


"Janice Caron" wrote
> pure requires transitive const.

Forgive me if I don't take your word for it.  Please prove this. 
Specifically, why pure fails with logical const (not head const as C++ is). 
Assume these are the rules for pure:

- a pure function can only access local variables
- all parameters to a pure function must be logically invariant
- a pure function can only call pure functions or methods.
- a pure method cannot access the mutable portion of a logically invariant 
data value.

-Steve 





More information about the Digitalmars-d mailing list