Erlang / FP and Java

Mickaël Rémond <>
Fri Jul 16 12:12:34 CEST 2004


On Thu, 15 Jul 2004 19:10:23 +0100, David Hopwood  
<> wrote:

> Mickaël Rémond wrote:
>> Hello,
>>  The functional paradigm is progressing even amongst Java developers ;-)
>
> Well, amongst people who write articles aimed at Java developers :-)
>
>> Here is an interesting article on IBM developerwork explaining how to   
>> write functional programming oriented code in Java for modularity:
>>  http://www-106.ibm.com/developerworks/library/j-fp.html?ca=drs-tp2904
>>  Erlang is even mentioned.
>
> The problems with trying to do functional programming in Java are that
> (pre 1.5) it has a monomorphic, manifest static type system, and it
> was not designed to have a concise syntax for closures. This leads to
> verbose and difficult-to-read code that obscures the advantages of FP.
> The examples in the article only serve to confirm this.

It is interesting to see that some Java developer feels the need to  
explore functionnal programming element to add modularity to their  
development. But of course, you are right, it is purely theorical. A  
friend of mine once convince of the value of the functionnal style  
programming tried to use functionnal like approach in other languages. He  
discovered for example that functionnal programming call kill the machine  
(at least virtual) when you use recursive calls (tail recursive) in  
language that to not optimise those calls.

This article is food for thought however.

Cheers,

-- 
Mickaël Rémond
  http://www.erlang-projects.org/



More information about the erlang-questions mailing list