5 ms·
Clojure is continuing the LISP subculture that has existed for a long time, nothing new here. OO will continue to be successful for accessibility reasons, and
by seanmcdirmid 12y ago
Clojure is continuing the LISP subculture that has existed for a long time, nothing new here.
OO will continue to be successful for accessibility reasons, and it's demise will continue to be predicted to have arrived.
- twic 12y agoI think you're right about OO's continued survival. I also think mikerichards is right that OO is just technicolor procedural programming. Moreover, i think these two things are related: OO is immortal in part because it's straightforward and obvious, just like procedural programming. But i don't think Clojure is just continuing the (equally immortal!) LISP subculture. I think LISP is growing by recruiting people from OO-ish languages like Java, Python, and Ruby, rather than from existing LISPs. This is the first time in a long time that a LISP has done that. It's also the first time in a long time that a LISP has got even this glimmer of mainstream use. pg wrote 'Beating the Averages' in 2001 [1], and even after that, everyone still thought LISPers were freaks. But announce you're using Clojure in production today, and nobody bats an eye. [1] http://www.paulgraham.com/avg.html http://www.paulgraham.com/avg.html
- seanmcdirmid 12y agoThe advantage of OO has always been its accessible constructs and abstractions that mirror how we talk about things linguistically. Nouns are just sticky that way. It isn't a big delta over procedural programming, and you can find object systems in many C programs written before OOP was even a word. Heck, even Clojure has its own object systems; they just often call them entities rather than objects (what is an entity? well, its an object, but not the object you are used to). I think our current OO abstractions suck, but the paradigm is OK, especially when considered in the abstract (go back to the treaty of Orlando to see how diverse objects can be!). And the biggest pushers of objects in the early day were CLOS people like Richard P Gabriel, and CLOS (edit: Flavors actually as lipsm points out) gave us mixins, which are a pretty advanced OO construct (though RPG argues the mixins that got adopted in OO languages were not the ones CLOS intended). People were using LISP in production in the 90s as an advantage, but then they were also using Smalltalk or Objective C also (ironically often in the same places...on Wall street). A new generation is discovering LISP while learning other languages first, but the phenomena is the same: OO was just less popular in the past and so they would come from C or Perl instead of Java. [edit: not sure why you were downvoted, I thought your post was completely reasonable]
- lispm 12y agoMixins are from Flavors, not CLOS. CLOS has no special support for mixins - they are just a sub-functionality of CLOS.
- seanmcdirmid 12y agoThanks, my understanding of history is probably a bit confused: http://en.wikipedia.org/wiki/Mixin#In_Common_Lisp http://en.wikipedia.org/wiki/Mixin#In_Common_Lisp In RPG's inconsumerability essay [1], he describes it like: > In that paper they described looking at Beta, Smalltalk, Flavors, and CLOS, and discovering a mechanism that could account for the three different sorts of inheritance found in these languages—including mixins from Flavors and CLOS. They did come from Flavors first regardless (mixins being named after an ice cream shop with mixins near MIT, so I heard). I think it was also the first system to allow for aspect advice via a first-class construct. [1] http://www.dreamsongs.com/Files/Incommensurability.pdf http://www.dreamsongs.com/Files/Incommensurability.pdf
- lispm 12y agoMixins were introduced with Flavors by Howard Cannon in 1979. Flavors/Mixins were used to implement some of the early MIT Lisp Machine user interface, IO and networking code. http://lispm.de/docs/Publications/Flavors/Flavors,%20a%20non-hierarchical%20approach%20to%20object-oriented%20programming.pdf http://lispm.de/docs/Publications/Flavors/Flavors,%20a%20non... 'aspect advice' was mostly introduced in Lisp in 1966 by Warren Teitelman: http://dspace.mit.edu/handle/1721.1/6905 http://dspace.mit.edu/handle/1721.1/6905 See the discussion of ADVISE and a BEFORE example in the paper... From there it came to Interlisp, Maclisp, Flavors and CLOS...
- seanmcdirmid 12y agoThanks. The Teitelman work is what I cite as the introduction of aspects, but I didn't realize it was more than just a pattern back then.
- twic 12y ago
- mikerichards 12y agoI wasn't predicting a demise, just like I wouldn't predict the demise of C, COBOL, or other procedural languages. What I meant was is there a significant portion of corporate decision makers that don't look at OO as the default programming methodology, than say 10 years ago? I'm actually pretty surprised at the uptake of Clojure, especially compared to Scala, which would intuitively be the next language for corporate adoption on the JVM. I think there are many developers and decision makers that are looking for simplicity now.
- seanmcdirmid 12y agoDo you have any numbers on Clojure vs. Scala adoption? The Clojure community is definitely vocal, but Scala has made a lot of successes also, and at this level of marketshare, it is difficult to say if they are equal, or if adoption is off by an order of magnitude. Scala in particular has done well in the systems community, oddly enough.
- destructaball 12y agoAnecdotally, I've been applying for jobs using Scala and Clojure in Australasia and Europe and the Scala jobs seem more numerous and far better paid
- mikerichards 12y agoI don't have any numbers, but given the relative youth of Clojure vs Scala, and the adoption that Clojure is getting, I'd say that the trajectory is pretty much on Clojure's side. And this is coming from someone that isn't particularly keen on s-expressions or dynamic typing. Like I said in my first comment, I'm pretty much amazed at the adoption of Clojure by some mainstream companies.
- seanmcdirmid 12y agoWell, there is always http://xkcd.com/605/ http://xkcd.com/605/ When your base is high, adoption trajectories are pretty high, but level off fairly quickly. We still need a few years to tell what is actually going on.
- swannodette 12y agoNot sure what you are talking about - Clojure has a great many OO-ish constructs - even local state! The only thing that's really missing is deep support for static forms of inheritance. As programmer that feels quite at home with OO idioms - Clojure distills it down to the parts I actually like.
- seanmcdirmid 12y agoI totally agree with this, and LISPs have always been pragmatic about state, although I get the feeling that Clojure emphasizes purity a bit more than other LISPs. I was replying to two separate points from parent, the points weren't meant to go together :)
- dj-wonk 12y agoWell, not all LISPs are considered friendly from our modern context. Just consider my favorite 'love to hate' Emacs Lisp example: http://www.emacswiki.org/emacs/DestructiveOperations http://www.emacswiki.org/emacs/DestructiveOperations Check out the bit where using 'sort' incorrectly can self-modify the function. Anyhow, maybe Clojure is "just" another LISP, perhaps, but it is really nice due to many small improvements making a big difference.
- seanmcdirmid 12y agoWell, it isn't very weird that today's LiSP is better than yesterday's. Clojure also takes purity a bit more seriously, though nowhere near as serious as something like haskell.
- current_call 12y ago"Well, it isn't very weird that today's LiSP is better than yesterday's." I wouldn't be so sure of that.
- jules 12y agoIn order for that to be a testable prediction the terms need to be made precise. OO is a famously vague concept with many different concrete incarnations. There's single dispach vs multiple dispatch. Within single dispatch you have prototype based vs class based. You have objects as a record of closures. With multiple dispatch you have dispatch on class, or predicate dispatch, or full pattern matching. There's the question whether some form of identity or state is part of OO. The concept is broad enough that you can easily stretch it so that almost any modern language is OO in some form. A functional or logic programming language where functions can be split into multiple cases with pattern matching is arguably just a generalization of predicate dispatch. If on the other hand we restrict the term to languages where values are essentially identity + a record of methods (whether through the indirection of a class v-table or directly stored in the value as in prototype based languages), I do think that model has largely run its course. It will certainly remain popular in the near future, but people are increasingly realizing that modeling everything as a record of methods + identity (+ state?) isn't a good way to do it. There are certain things that lend themselves to that way of modeling, but most things are best modeled in some other way. Records of functions + identity is just one particular data type among many, and it's not any more special than any other data type. Modeling everything as an object is like TCL where you model everything as a string. OOP is nice on the surface because you have some vague analogy to real world objects, but that does more harm than good. It is similar to agile or TDD where people try to sit down at the computer and immediately start typing code without any careful thinking beforehand. Like TDD and agile, OO also facilitates that kind of programming because people can take the concepts in their head and immediately start typing class definitions. It works for easy problems, but even there it does not lead to a pretty end result (one of the symptoms that sticks out most is the question 'on which class does this method belong?'). Rather than designing your program to model the real world, it usually works much better to design your program around the problem you're trying to solve. Rather than starting with the real world and making an analogue to it in your program, you start with the problem you're trying to solve and come up with a data model that facilitates solving that problem. A famous example of the former style gone wrong is Ron Jeffries who tried to write a sudoku solver with an OO + TDD approach in a series of blog posts. He modeled his program with classes that seem natural for the problem, and he wrote tests for those. Unfortunately writing a sudoku solver is not one of those problems where you can just start banging out code without any thought and get it to work, so he got stuck because he did not think about how to actually solve the problem, he only thought about how to model the real world with OO.