4 ms·
At the risk of predicting future fashion trends, which is rarely a good idea, I'll venture that objects are going to continue to be trendy for at least a few mo
by Zak 16y ago
At the risk of predicting future fashion trends, which is rarely a good idea, I'll venture that objects are going to continue to be trendy for at least a few more decades.
This article is four years old, but since the prediction spans decades, I think it's fair to pick on it a little.
The OOP trend seems to be waning. The languages people are getting excited about lately seem to be de-emphasizing OOP and providing other mechanisms for some of the useful attributes of OOP.
Haskell and Clojure don't have OOP as most people know them, but Clojure's multimethods and Haskell's typeclasses replace OO polymorphism to a large degree. Scala and F# have OOP, but using it is optional.
Ten years ago, a new language intended for practical work and lacking OO wouldn't be taken seriously. That has changed, and the change seems to be accelerating.
- jules 16y agoAs often happens, the good bits of a trend will remain (polymorphism and open recursion for example) and the bad bits (elaborate design patterns) and the irrelevant bits (public, private & protected) will be removed.
- fauigerzigerk 16y agoYou're right and I'm glad OO is waning a bit. But I think what's really happening is that some popular features of OO are getting more ingrained and others are shed. Take clojure for instance. Initially it had multimethods, which is a really useful and general facility. I like it. But now they're adding that dispatch-on-first-parameter special case back in. Similarly, Go has omitted most of OO, but they use interfaces to support that same special case.
- DrJokepu 16y agoThat reminds me, I've read a very interesting paper on OOHaskell (object-oriented Haskell) a few years ago, you can find it at http://homepages.cwi.nl/~ralf/OOHaskell/paper.pdf http://homepages.cwi.nl/~ralf/OOHaskell/paper.pdf
- pbh 16y agoI don't disagree, but it seems like you're overstating your point by calling OOP "optional" in Scala (and possibly F#). Scala is explicitly marketed as a hybrid OOP/functional language. At least from "Programming in Scala," it seems as though writing idiomatic Scala really requires both paradigms. I see Scala as adding functional programming rather than de-emphasizing OOP, the former being a common thread in new (multi-paradigm) languages.
- WilliamLP 16y agoI don't actually see a trend in the last 2-3 years of people getting more excited about Haskell, Clojure, Scala, and F#. Two years ago, people on forums like this one were extremely excited about these languages. Outside of the forum scene, and into the industry, I see a lot more eye-rolling and knowing "here we go again" stares than excitement about these. I don't think we should lose sight of the fact that extreme enthusiasm about functional programming and Lisp taking over as the dominant paradigm in programming is almost as old as programming itself.
- dkarl 16y agoNot to mention that Scala is explicitly OO, F# is based on Objective Caml, and Clojure owes a lot of its success to the libraries provided by a huge, thriving OO community. OOP is not waning unless you define OOP as the design pathologies imposed by bad OO languages.
- nickik 16y agoClojure even goes beyond what java can do with protocols and defrecord is basically a class. So you could almost say its OO from the point of the original description (encapsulation (with name spaces), polymorphism (multi methods). Inheritance you can do with the ad hoc hierarchy system. Its pretty cool. The thing is just in Clojure you only use this stuff when it is useful not like in mainstream OO where you have to drag it along with you all the time and therefor miss out on all the functional goodness (and on lisp/concurrency goodness) See this short video about protocols (and a little generic method and defrecord stuff): http://vimeo.com/11236603 http://vimeo.com/11236603 (you should look at it even if you don't like clojure, it has some interesting stuff in it about the expression problem, and how to solve it in there)