Transitive const sucks

Janice Caron caron800 at googlemail.com
Wed Sep 12 06:56:55 PDT 2007


> You obviously missed the discussion of the "pure" keyword, borrowed from Fortran-90 from the conference. This is a clear way of declaring that a function must not have any side-effects.


Cool!

But then, I don't understand Walter's objections to "logical constness".

Seems pretty simple to me. If a function is logically const but not
truly const, then don't declare it pure.

Conversely, if it's not declared pure, then it can have logical constness.

Isn't that problem solved?



More information about the Digitalmars-d mailing list