Confusion over what types have value vs reference semantics
Neurone via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Sep 11 08:15:09 PDT 2016
Hi,
Are there universal rules that I can apply to determine what
types have reference or value semantics? I know that for the
basic primitive C types (int, bool, etc) has value semantics.
In particular, I'm still trying to understand stack vs
GC-managed arrays, and slices.
Finally, I have an associative array, and I want to pass it into
a function. The function is only reading data. Would putting ref
on in function parameter pass it by reference?
More information about the Digitalmars-d-learn
mailing list