Hacker News new | past | comments | ask | show | jobs | submit login

> in a language like Python, it isn't always clear whether my_list is a value or a reference.

I can't think of anything that's a value? At least since Java, the idea of "everything is an object" seems pretty dominant in most languages.

There are a few immutable types, like ints, strings and tuples, but you still refer to them by reference.




As a pure implementation detail, IIRC, I think small integers and maybe True/False/None are values in CPython but logically its all references.




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

Search: