Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Java is pass-by-value, Dammit (and so are Ruby and Python, Dammit). Parent comment
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.
There are no comments on this comment yet.
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.