Is there any real reason to use "const"?

rempas rempas at tutanota.com
Mon Jan 24 16:23:25 UTC 2022


On Monday, 24 January 2022 at 14:22:55 UTC, Guillaume Piolat 
wrote:
> const has utility at interface boundaries. You don't want an 
> API to be used incorrectly.
> If it's internal code though, it only helps the maintainers, 
> and is often line noise.

I mean, I can understand and agree the cases where people will 
just make mistakes because they are humans or because they are 
coding at a time they should be sleeping but like I said, I think 
that why should start writing good documentation and people 
should start reading it. Thanks for your thoughts!


More information about the Digitalmars-d mailing list