Re:Python, as Reviewed by a C++ Programmer
by dboreham on Sunday April 23, 2017 @01:13PM
(#14179076)
Yes. But. Language designers go out of their way typically to hide this underlying truth, by for example implementing "call by value" when the type of the value is "Customer" or whatever.
[ Parent
| on HN ]
It's specifically because high level language semantics often mask the underlying implementation that knowing that implementation is necessary for truly understanding what's happening. The situation you describe is call by reference, where the value passed on the stack or in a register is a reference to a customer object. You could pass a customer object by value (in languages that allow it, such as C++) by copying the structure verbatim onto the stack and addressing it there.