'const' and 'in' parameter storage classes
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri May 15 09:08:30 PDT 2015
The scope storage class means you promise not to escape any
reference to the data. This isn't enforced but it is similar in
concept to Rust's borrowed pointers - it may someday be
implemented to be an error to store them in an outside variable.
Only use 'in' if you are looking at the data, but not modifying
or storing copies of pointers/references to it anywhere in any
way.
More information about the Digitalmars-d-learn
mailing list