News for hackers. Stuff that matters.
Re:Reasons Python Sucks by szatkus on Tuesday December 18, 2018 @02:11PM (#18709577)
My C++ is a bit rusty, but AFAIR `void f(Object& o) { ... }` would allow you to replace the whole object in passed variable (`o = o2`). You can't do this in Java, you can only modify its fields.

It's more like `void f(Object* o) { ... }`

Re:Reasons Python Sucks by civility on Tuesday December 18, 2018 @02:29PM (#18709714)
You're right, it is more like a pointer. In C++, that would call the assignment operator which can do anything it wants, but the address of the Object would not be replaced. Java would change the value of the pointer in the callee.

These cross-language comparisons have too many nuances for me to try and make simple examples. Really, my original point is that CPython does not have "primitive types" as in Java. Everything is passed by pointer to the PyObject.