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

I meant that it's a pointer that is aware of the type of object it's pointing to by virtue of all objects knowing their own type. Same difference I guess.

Unlike void pointers or Object references in Java you can't "forget" an object's type.



Ah, I think I see what you mean. I still think it's more accurate to say that names are just pointers that don't have any typing info themselves (or if they do, it's an implementation detail that doesn't actually get surfaced and isn't a part of the language definition). In Python it doesn't quite make sense to talk about the type of a "name" or "variable" or "pointer" because, because it points to an object, and that's where the canonical type info actually lives.




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

Search: