couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Blakey <antony.bla...@gmail.com>
Subject Re: Erlang vs Scala
Date Wed, 08 Apr 2009 14:05:39 GMT

On 08/04/2009, at 10:00 PM, Richard Heycock wrote:

> Excerpts from Antony Blakey's message of Wed Apr 08 20:00:51 +1000  
> 2009:
>> It's important to distinguish between Java the language, and the JVM.
>
> Indeed but as the end user the only they see is the JVM. They don't  
> see
> any language features whether they be OO or functional.

Exactly my point. So the fact that it runs on the JVM is relevant -  
what language its written in doesn't matter.

>> Neither Scala nor Clojure suck in the ways that Java does.
>
> But that is like saying you must use couchdb because it is written  
> in a
> functional language.

Not at all. I was responding to your anti-Java comments. IMO Scala and  
Clojure both have interesting solutions to concurrency, as does Erlang  
(and CSP and ...). Slightly different solutions, to be sure, and the  
jury is out on what the best approach to concurrency is, particularly  
given the ancillary pragmatics. The details of the Erlang model have  
certainly proven useful for some domains - provably so.

Personally, I do have more faith in large systems written in powerful  
languages, as opposed to assembler for example. That's for a number of  
reasons, the most obvious being that error rates seem proportional to  
the number of source constructs, so you can expect less errors in  
software written in more powerful/concise languages. Of course  
programmer skill is an enormous factor, but that's an implicit input.  
Concision obviously isn't independent of the problem domain for a  
given language, and so the combination of language + problem is a  
valid input when considering a solution.

I think in a constrained sense you can say that functional programs  
(given the functional languages we have to choose from) are a) likely  
to have fewer bugs, b) result in more sophisticated solutions, c) use  
more memory, possibly a lot more; and d) be somewhat slower, at least  
compared to what one could theoretically achieve in e.g. C, ignoring  
the other points.

There is significant consensus that languages such as Erlang, Scala,  
and Clojure, which are (largely) functional, albeit not ideologically  
so (unlike Haskell) are better at producing programs that operate  
correctly in the face of concurrency.

> The end user doesn't care what it's written in; all
> they care about is whether it works as advertised.

But you said:

> If couchdb had been written in java I wouldn't have gone near it.

So obviously the language it's written in matters to you.

Antony Blakey
--------------------------
CTO, Linkuistics Pty Ltd
Ph: 0438 840 787

If at first you don’t succeed, try, try again. Then quit. No use being  
a damn fool about it
   -- W.C. Fields


Mime
View raw message