How do you properly use immutable on class members?

Ali Çehreli acehreli at
Tue Mar 29 19:26:51 UTC 2022

On 3/29/22 11:59, H. S. Teoh wrote:

 > As a general principle, const should be used when you're on the
 > receiving end of data that should not be changed (e.g., function
 > parameters)

Better yet, and as I know you know :), and as it comes up occasionally 
but I usually forget in my own code; 'in' is much better than 'const' on 
function parameters because it has super powers when compiled with 


More information about the Digitalmars-d-learn mailing list