4 ms·
The definition of OOP rather depends on who you ask, but I suspect Alan Kay would disagree with you there :)
by weavejester 13y ago
The definition of OOP rather depends on who you ask, but I suspect Alan Kay would disagree with you there :)
- jbooth 13y agoTake a look at some OOP C code sometime. Oh, C doesn't have objects? Sorry, I meant a my_struct{} and a bunch of my_struct_op(struct, otherargs) functions. You seem to be pretty emotionally invested in FP vs any other programming paradigm. I'm more of a "lots of tools in the box" kind of guy.
- djur 13y agoBundling a set of methods to a struct in C is not full OO. It lacks inheritance/delegation, encapsulation, polymorphism, and message passing, and I don't know of any definition of OO that doesn't insist on at least one of those. Alan Kay's summary is interesting: http://userpage.fu-berlin.de/~ram/pub/pub_jf47ht81Ht/doc_kay_oop_en http://userpage.fu-berlin.de/~ram/pub/pub_jf47ht81Ht/doc_kay...
- weavejester 13y agoI just meant that people have very different ideas about what OOP means. You seem to have an unusually broad definition, but others, particularly the guy who coined the phrase in the first place, have more specific definitions. In general, most people agree that OOP involves some form of information hiding, which you seem to disagree on. I also wouldn't say I'm particularly emotionally invested in FP, just that I'm very skeptical of OOP as a paradigm. OOP languages tend to promote hidden, mutable state, but visible, immutable values are far more useful.
- jbooth 13y agoFair enough.. if you're talking about a giant class hierarchy with lots of mutable state, then I tend to agree that it doesn't usually lead to good software (although things like java's collections library and the outputstream hierarchy are good exceptions).