When using the in storage class in D the data is immutable to your function. Does this also pass in the data by reference and not by value? I noticed that in ref is not valid.
If in doesn’t pass in the data by reference, is there a way to get the data by reference but have a guarantee to the caller that the data will not be modified?
inparameters are not passed by reference.As far as I can tell from the documentation,
inis just a shortcut forconst scope. I do not see any way to emulateref inparameters, sinceref scopeis illegal. As BCS said, you can useref constif you don’t care about thescopestorage class.