Is there any real reason to use "const"?

Walter Bright newshound2 at digitalmars.com
Mon Jan 24 20:02:11 UTC 2022


On 1/24/2022 8:43 AM, rempas wrote:
> 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...

You can see this if you run an object file disassembler over the compiler 
output, the immutable data goes in read-only sections.


More information about the Digitalmars-d mailing list