What purpose to const besides functional programming?
Simen Kjaeraas
simen.kjaras at gmail.com
Thu Jul 24 07:17:04 PDT 2008
Jason House <jason.james.house at gmail.com> wrote:
> Simen Kjaeraas Wrote:
>> You are expecting invariant member functions to not do things they can
>> and should do.
>
> My example was in response to Walter's statement (#5) that invariant
> objects can be accessed without synchronization. I was providing a
> simple counter example.
Yes, but you still seem not to understand what an invariant function is,
and why it should exist. An invariant object (read: invariant data)
/can/ be accessed without syncing. An invariant method cannot. Invariant
functions are not and should not be pure functions. The two are
different kinds of beasts. One is functional programming, the other is
not.
--
Simen
More information about the Digitalmars-d
mailing list