Hacker News new | ask | show | jobs
by kssreeram 6043 days ago
This is a common point of confusion. There are two distinct orthogonal language properties at play here:

1) Variables being references(pointers) to objects.

2) Function arguments being passed by reference or by value.

In Python, all variables are pointers to heap allocated objects, and these pointers are simply passed by value when calling functions.

In C++, it is much easier to understand this distinction as it provides full control to the programmer on both aspects.