Actual immutability enforcement by placing immutable data into read-only sections

Nick Treleaven nick at geany.org
Wed Dec 21 12:38:31 UTC 2022


On Monday, 19 December 2022 at 15:52:29 UTC, IGotD- wrote:
> Couldn't D could just have used the 'const' keyword for such 
> data.

Then you wouldn't be able to share it across threads. Besides you 
can still do `new immutable int` at runtime so it is consistent.


More information about the Digitalmars-d mailing list