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

my understanding is an object is a particular piece of memory, structured according to a class which may be seen as the abstract data type for that particular piece of data. As far as I understand the JVM, the compiler doesn't replicate function bodies for every instance of a class. I think a more appropriate title to this article would be... "protocols and datatypes in clojure", of course I wouldn't have read the article if that were the title...


"an object is a particular piece of memory, structured according to a class" does not sound like a particularly useful way to think about objects unless you are working at a low enough level that you care how objects are laid out in memory.


I don't particularly care how it's laid out. The point is that it is an instance of a class, which maintains its own local state - I don't care how that state is organized, but it's crucial to remember that it has such state.




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

Search: