re: What’s an unpopular software opinion you have? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: 5) JavaScript is an OOP language. It's object system comes from Self. Classes and objects aren't the point of object oriented languages. The key id...
 

It seems that I effectively used the wrong words here. JavaScript indeed use object. The object pattern is prototyping. But I still think that JavaScript is not "in essense" an OOP Language but a language proposing it: the language does not favorise the use of object and "this" does not refer to an object the same way that any other language (but the prototype it's currently called in) and does not make the thing easy.

We can object to that that functions are kind of "object" themselves.

I realize though that my knowledge on this particular subject is not that strong, so is my position on it. I'll check the work of Alan Kay that you mention earlier. Thanks a lot.

Clarification of my mention of Alan Kay: he invented object oriented programming along with the rest of the Smalltalk group at Xerox PARC.

this in JavaScript behaves the way it does in any other prototype based language (as I mentioned before, see Self). Self and its lineage were part of an attempt to make an even purer object oriented language that Smalltalk. In Smalltalk you had objects...but you also had classes, which were somehow different. They were objects, but were part of a totally different inheritance hierarchy. Self asked if the classes were really necessary, or if they were baggage carried over from earlier programming experience. The answer at this point is quite clear. Classes are unnecessary, but it's really hard to get people past the baggage and comfortable with conjuring objects directly.

For completeness, there's a third branch of object oriented programming represented by Common Lisp's CLOS based on structs and generic functions with multiple dispatch. It turns out to be an even more powerful approach, and this isn't a thing in that system at all. That branch, if you take it seriously and work out the mathematics, leads to Stepanov's work on generic programming and the C++ Standard Template Library.

code of conduct - report abuse