Fully transitive const is not necessary

Simen Kjaeraas simen.kjaras at gmail.com
Wed Apr 2 07:46:12 PDT 2008


On Wed, 02 Apr 2008 16:41:33 +0200, Steven Schveighoffer  
<schveiguy at yahoo.com> wrote:

> "Simen Kjaeraas" wrote
>> On Wed, 02 Apr 2008 16:04:36 +0200, Steven Schveighoffer  wrote:
>>
>>> - a pure method cannot access the mutable portion of a logically
>>> invariant data value.
>>
>> Wouldn't this basically make it transitive invariant?
>
> Yes, which makes my point :)  pure must be transitive, but const /  
> invariant
> by itself does not need to be.
>
> -Steve

So yes, you can do without transitive const, as long as you define logical  
const as transitive. I can't quite see what point you're trying to make.

-- Simen



More information about the Digitalmars-d mailing list