Logic const with lazy const
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jul 6 13:10:40 PDT 2014
On 7/6/2014 7:20 AM, bearophile wrote:
> I guess other persons have already suggested something like this. Here there is
> a "lazy immutable" instance member x, that can be only in two states: not
> initialized, and initialized with an immutable value.
Not specifically. My opinion on logical const isn't consensus, but I believe
that logical constness is way, way down on the list of things that a type system
can productively support. It's easily handled with existing features by using a
struct.
More information about the Digitalmars-d
mailing list