Storage classes like immutable/const/shared are not tied to any memory
management strategy. Nor does it dictate memory lifetime.
It only dictates how it can be interacted with when you have a reference
to it.
On 4/10/22 20:05, norm wrote:
> On Sunday, 10 April 2022 at 23:19:47 UTC, rikki cattermole wrote:
> In my mind immutable data
> means the data will not change and neither will the result of reading
> that data, ever.
Yes.
> I don't get how you can have thread safety guarantees based on immutabl
On Sunday, 10 April 2022 at 23:19:47 UTC, rikki cattermole wrote:
immutable isn't tied to lifetime semantics.
It only says that this memory will never be modified by anyone
during its lifetime.
This is clearly where I am misunderstanding. In my mind immutable
data means the data will not ch
immutable isn't tied to lifetime semantics.
It only says that this memory will never be modified by anyone during
its lifetime.
Anyway, the real problem is with const. Both mutable and immutable
become it automatically.
Hi All,
I am clearly misunderstanding something fundamental, and probably
obvious :D
Reading some of the discussions on __metadata I was wondering if
someone could explain why a immutable reference counting type is
needed. By definition a reference counter cannot be immutable, so
what would