On 6/21/15 6:51 PM, Tofu Ninja wrote:
On Saturday, 20 June 2015 at 00:07:12 UTC, Andrei Alexandrescu wrote:
...
I question how much good something like this would do. I feel like const
vs immutable vs shared vs inout is already very confusing as is,
something like this would just add more stuff to think about on top of
it and just make the whole system more confusing. I know its supposed to
be for implementation internals, but I just worry that it will just make
things more complicated. I feel like the type system is already pretty
ugly right now, do we need to make that worse/is it worth making that
worse?
Also would it be possible to restructure the container to cleanly
separate the mutable and immutable parts? I think if its possible, it
would be a much better solution.
Just my 2c...
All good points. I think we need to accept that immutable objects must
rely on the garbage collector; reference counting them is not accepted
in D's type system. -- Andrei