Logical const

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Nov 28 15:52:56 PST 2010


On 11/28/10 4:02 PM, Walter Bright wrote:
> Jonathan M Davis wrote:
>> Walter is certainly against logical constness,
>
> I don't know of any language that provides logical constness as a
> feature. I know of no way to make it a statically verifiable attribute.
> Doing it with runtime checks is arbitrarily complex (imagine having to
> verify with a runtime check that one didn't change a 1Gb data structure).
>
> D has a focus on providing features that promote verifiability of
> programs. As programs inevitably get more complex, I believe this is
> crucial (as opposed to the older technique of relying on convention).

Logical immutability can be implemented with reasonable guarantees (s we 
discussed a while back in private). The question is whether the effort 
is justified.

Andrei


More information about the Digitalmars-d mailing list