Hacker News new | past | comments | ask | show | jobs | submit login

There are many other multi-paradigm languages around... even ones that combine the OO and functional paradigm: OCaml and Mozart/Oz spring to mind.

I think the recent popularity of Scala and Clojure, vs other languages that mix the OO and functional paradigms, really come from one thing and one thing only: Scala and Clojure run on the JVM. Everything else is really secondary.

Well, there's that and some kind of successful marketing effort going on. Unfortunately, it's not easy to study exactly why "buzz" builds up around certain languages. Clearly Java and C# had whole corporations' marketing departments behind them, so that probably didn't hurt. Ruby and Python made "Perl sucks so you should program in us instead" in to a successful mantra (you know what they say about repeating a lie often enough..).

Clojure and Scala don't really have the same things going for them, but they are buzzword compliant, mixing OO, functional programming, and the JVM together. Programmers hear that and it sounds sexy, so they jump on board.

Now the question becomes more of whether that initial buzz can be converted in to long-term success for the language, which depends less on language features than on the language's community and on further marketing (which, of course, may depend on having "killer apps" and what companies, projects, and personalities they can get on board).




I don't know about Mozart, but everything I've read about OCaml suggests that the O in OCaml is second class. I've even heard it quoted that the creator of OCaml doesn't use any of the OO features in OCaml and that most people view them as a failed experiment on the language. Pages like http://stackoverflow.com/questions/535481/classic-singleton-... are very telling of the attitude of the OCaml community about its OO features.

Scala is the first language I've seen where the OO and functional features are on an even plane and even play nicely together, and where the community is accepting of both styles of programming.


Clojure doesn't really mix OO and functional styles. The only real OO bits in Clojure are for interoperation with Java libraries; I've never seen them used for anything else.

Clojure has a couple major things going for it. One is that, to me and at least a few other people, it feels like a well-designed tool. I constantly get the sense, when programming in Clojure that Rich Hickey understands what I want to do, and designed a tool to make it easier.

The other big advantage is its focus on concurrency and parallelism[0]. Clojure is built around constructs designed to make concurrent and parallel programming easy. All the data structures are immutable, but relatively efficient. The built-in constructs for coordinating state changes are very well thought out. These features could be added as libraries to most languages, but having them built means libraries will use them too, and the syntax is nicer.

[0] They're not the same thing: http://ghcmutterings.wordpress.com/2009/10/06/parallelism-co...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: