Jeff Heon <jfh...@gmail.com> writes: > I'm puzzled when we say that Clojure is not particularly OO, but using > protocols and datatypes feel OO to me, > except that the namespace of the protocol method implementations is > decoupled from the namespace of the type. > > Perhaps my definition of OO is too loose and I should think of > protocols as "just" abstraction & polymorphism.
When people use the term OO they usually specifically mean traditional imperative class-based OO as implemented by popular languages like Java and C++. They might also count imperative prototype-based OO like JavaScript. To quote the Wikipedia page on OOP: Benjamin C. Pierce and some other researchers view as futile any attempt to distill OOP to a minimal set of features. He nonetheless identifies fundamental features that support the OOP programming style in most object-oriented languages: * Dynamic dispatch * Encapsulation * Subtype polymorphism * Object inheritance * Open recursion Clojure has some of those features, but it is sufficiently different from the traditional model that I would consider "not particularly OO" a valid, if not particularly useful description. There are certainly similarities though, after all Clojure tries to solve similar problems. If you consider idiomatic Clojure code to be strongly OO then you would definitely have to classify idiomatic Haskell and maybe even idiomatic Scheme similarly. In which case the distinction starts to become not very useful and basically just devolves to "has some sort of user-definable data type system" and there are very few general-purpose programming languages which lack one. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en