3 ms·
I think you give Scala a disservice by saying there is no innovation in it. I have programmed in Perl, PHP, Python, Ruby, C/C++, Java, C#, and even a tiny bit o
by sreque 17y ago
I think you give Scala a disservice by saying there is no innovation in it. I have programmed in Perl, PHP, Python, Ruby, C/C++, Java, C#, and even a tiny bit of Scheme and Clojure, but Scala is the first language I have seen to so successfully merge the ideas of OOP and functional programming. For instance, someone at EFPL did their PHD thesis on how to combine the features of functional pattern matching with the OOP concepts of encapsulation and information hiding, which you can read at http://biblion.epfl.ch/EPFL/theses/2007/3899/EPFL_TH3899.pdf http://biblion.epfl.ch/EPFL/theses/2007/3899/EPFL_TH3899.pdf.
Another example is their rich collections library, which contains mutable and persistent immutable versions of the standard data structures, and exposes them all through very clean OO abstractions. None of the above languages except maybe clojure even has such a rich collections library built into its standard library, and clojure's dynamic typing allows it to ignore some of the issues that come with designing a clean collections interface.
Of all the languages I have used extensively, Scala has the most functional features by far, and it is in this sense that Scala can claim to be a leader in helping functional features become more mainstream and make up new terms like "post-functional" :).
- jerf 17y agoYou could write that same comment about most of the languages you listed with only a bit of modification, really. All of them are better at something than the other ones are. None of them are "post-"anything. I didn't say there was no innovation. I said the idea of "post-functional" doesn't seem to make any sense when we already have a perfectly good word. Merely having a slightly different emphasis on which the of the multiple paradigms are dominant in which places and being arguably a better selection for some purposes for some people is hardly worth a new word. Besides, "post" functional rather implies that functional has had its day and is now played out. Modern functional (immutable variables, very strong type systems, etc.) hasn't even had its day; at best it's currently at the "hitting snooze on the alarm" phase of penetration. It's about twelve metaphorical hours early to be babbling about "post-functional".
- wooby 17y agoI too had done diverse programming until Scala, and the language introduced me to the functional paradigms which I now hold very dear. That being said, I was completely - and unprecedentedly - blown away by Clojure, as, in the Perlis-quote tradition, it completely changed the way I think about programming in ways that Scala did not. I've since decided that if I was going to master a JVM lang, it would be Clojure, and I've had the most fun programming Clojure since my Commodore Basic days. If you haven't seen any of the Rich Hickey videos on InfoQ, particularly "Are We There Yet," I can't recommend seeing them more. It sounds like you might be following a similar path to mine, and I can't recommend Clojure more highly. In the meantime though, enjoy your Scala trip - I did! :)
- gnosis 17y agoThere 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).
- Zak 17y agoClojure 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-concurrency/ http://ghcmutterings.wordpress.com/2009/10/06/parallelism-co...
- sreque 17y ago