On 02/17/2016 08:48 PM, Marc Schütz wrote: > On Wednesday, 17 February 2016 at 02:20:15 UTC, Dicebot wrote: >> One example of a existing guarantee you won't be able to keep, for >> example, is that any immutable allocation can be completely put into >> separate read-only memory. > > Yes, and it would be rejected statically (rule 2). I therefor don't > consider this a problem.
You pretty much prohibit any but typed allocators this way. I do see it as a problem. >> A very important property for building optimized allocators if you >> keep in mind sharing goals of immutability. > > This is considered too (rule 3). An object can only be immutable if all > its embedded @mutable members are marked as shared. That sounds rather weird considering immutable data neither needs nor synchronization nor CPU cache reloading and @mutable shared one needs both.
