Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: