Is there any real reason to use "const"?

rempas rempas at tutanota.com
Mon Jan 24 16:43:34 UTC 2022


On Monday, 24 January 2022 at 15:44:54 UTC, Walter Bright wrote:
>
> Immutable global data gets placed in read-only memory sections. 
> Read-only memory sections are nice in a demand-paged virtual 
> system, as the pages they are in never have to be copied 
> because they are never marked as "dirty".

Read only memory? So in the same place where string literals are 
placed? This sounds cool and it's really something considerable! 
Does this offer things like security as date will be able to be 
created once and not get modified again? I hope I'm not asking 
for too much...


More information about the Digitalmars-d mailing list