The following is a quote from the transcript of this:
http://www.infoq.com/interviews/armstrong-peyton-jones-erlang-haskell

(To see the whole transcript click on the "show all" button, and then select 
"no style" if you use Firefox).

This part of the dialogue shows a possible usage for pure (or more pure) 
languages: to correctly implement, avoiding to go mad, very tricky 
transactional algorithms.

In such situations the limiting factor is not the CPU nor the amount of 
programmer's time spent on the code (so both C and Python are unfit), but it's 
the brain of the programmer, because such algorithms are so tricky and complex 
that the problem is to understand them (enough to produce a correct 
implementation).

So a multi-purpose and multi-paradigm language (like Scala, and maybe future 
D2) can try to become fit for those purposes too (maybe not as fit as Haskell & 
Co. but fit enough for smaller similar purposes). In such situations 
performance is not the most important thing, as it's not important for the 
language to be handy and quick to write. What's useful is to have a language 
that keeps sides effects to the minimum allowing to create the more isolated 
subsystems as possible. I don't know if you can create such purer subsets into 
general languages like Scala/D2, but I think it may be doable.

>Suddenly people want to know how to write distributed programs, which they 
>never wanted to do before. So, how do you do distributed transactions? How do 
>you do consistency? It was always a pretty obscure part of computer science, 
>these distributed algorithms. Then we said "We've got these to do parallel. 
>How the heck do we program these things?" In Erlang or Haskell, these 
>algorithms are just difficult, but in other languages they are...

SPJ: Downright impossible!

JA: Yeah, right! I mean even if you have a very clean, pure programming 
language and you take Paxton algorithms or something like that, they are 
complicated things. They make your head hurt. There is a whole branch of 
mathematics, a whole branch of computer science to understand distributed 
algorithms and they live at the bottom of these social networks and things, 
ticking along. So I don't think you are going to see Erlang replacing 
Javascript or anything like that in browsers, but where you are seeing them 
being deployed is in the infrastructures, in the clouds and things like that, 
to glue the bits together properly, because that's where you need the complex 
algorithms. We are seeing an infrastructure-building things, cloud computing 
and what you are doing inside modern massive multicores, how do you organize 
computations. There where it's being used a lot.<

Bye,
bearophile

Reply via email to