Inherited const when you need to mutate
SomeDude
lovelydear at mailmetrash.com
Sun Jul 15 12:30:48 PDT 2012
On Wednesday, 11 July 2012 at 00:20:32 UTC, Timon Gehr wrote:
> I for one would be satisfied if inheriting from object became
> optional:
>
> // object.di
> class RawObject /+ this is the root of the class hierarchy +/{ }
> class SynchronizableObject : RawObject { void* monitor; }
> class Object : SynchronizableObject {
> const { stuff }
> }
>
> // user code
> class NoCruft : RawObject {
> // ...
> }
At first sight, I think this is an interesting idea. Maybe the
class hierarchy needs to be rethought for more flexibility ?
More information about the Digitalmars-d
mailing list