I just got it! (invariant/const)

Simen Kjaeraas simen.kjaras at gmail.com
Wed Apr 9 07:04:57 PDT 2008


On Wed, 09 Apr 2008 15:40:37 +0200, Janice Caron <caron800 at googlemail.com>  
wrote:

> On 09/04/2008, Jason House <jason.james.house at gmail.com> wrote:
>>  Consider this example:
>> <snip>
>
> Oh well, that's obvious. f() can't call D.invMemberFunc() because
> D.invMemberFunc() isn't pure. Pure functions can only call other pure
> functions.
>
> You know that. I know that. Why would anyone think it strange?

I think it is because invMemberFunc is invariant. Many read this as
"will not change anything", even though it is not what it means.

-- Simen



More information about the Digitalmars-d mailing list