Shall I use immutable or const while passing parameters to functions
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Apr 7 08:32:04 PDT 2015
If you're just looking at the data, use const. immutable becomes
more important if it is shared across threads or stored for later.
Functions that accept const will work with almost anything you
pass to it.
More information about the Digitalmars-d-learn
mailing list