3 ms·
Ok, yeah, I saw upthread about C++ and Pascal having a more formal reference type. But in C and Go you can pass pointers to pointers, in Java and Python object
by jbooth 9y ago
Ok, yeah, I saw upthread about C++ and Pascal having a more formal reference type.
But in C and Go you can pass pointers to pointers, in Java and Python objects with mutable object references..
It seems like the whole article could have been "Go does not have the C++ reference type, so it's not really in the mix when calling functions".
- lvh 9y agoYep. "Reference type" is a confused and overloaded term, so I prefer to say "pass-by-reference" when I meant int& and "pass-as-reference" (or the, in my opinion confused and confusing, pass-by-object, if that's helpful to the listener).