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

OOP is about messages according to the inventor - messages are about the interface. People get confused with objects which languages without messages don't have (you can get them, but they are not first class in the language)

Even plain objects though, the point isn't the inheritance! The point is to put an interface on the data. Inheritance is sometimes useful because, but there is a reason we keep screaming "prefer composition to inheritance" (even though few listen)



Just noticed that I wasn't clear - there are languages that have OBJECTS that do not do message passing. Message passing seems to be dynamic (duck type) function calls, which is debatable if it is worth it over static typing. You can get message passing in any language, but it is a lot more work and of questionable benefit vs static interfaces (there are pros and cons)




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

Search: