Why simple code using Rebindable doesn't compile ?

Era Scarecrow via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon May 30 23:40:31 PDT 2016


On Tuesday, 31 May 2016 at 05:31:59 UTC, chmike wrote:
> My conclusion is that rebindable is not a satisfying solution 
> to have mutable references to immutable objects.
>
> I don't understand the rationale of these immutable references. 
> It is too constraining.

  I still don't know why you're trying to use immutable. In the 
other thread you have listed you are trying to make a global 
singleton? You needed it mutable but marked immutable (for... 
some reason?) but all the methods won't change the contents or 
spirit of the object.

  I need to wrap my head around what you're trying to do before i 
can suggest anything else. Although making all members private 
and all functions as const would give you a mutable/unchanging 
object...


More information about the Digitalmars-d-learn mailing list