Readable Functional Languages

Brian Rogoff bpr at shell5.ba.best.com
Thu Feb 3 12:08:11 EST 2000


On Thu, 3 Feb 2000, Alexander Williams wrote:
> On 3 Feb 2000 00:33:19 +0100, Carel Fellinger <cfelling at iae.nl> wrote:
> >Admittedly off topic, I would like some advice on what language to choose
> >to explore the realm of functional languages given that I can't cope with
> >'impure' languages like C, C++ and Perl and that I love Python mostly for
> >its readability and its adherence to the principle of least surprise that
> >lures me into thinking that it has no dark corners.
> 
> You really have two /good/ choices:

More than two, really.

> If you're a traditionalist and parens don't scare you, Scheme is a
> really good platform for exploring functional programming.  Its not a
> 'pure' language, as such, but it can be programmed in a very pure
> style.

Given this, Dylan is also a good choice. Not pure functional, but it has 
higher order functions which are the sine qua non of FP. 

> If you're more daring, you can give Haskell a shake.  It /is/ a pure
> functional language and, as such, has some wackiness around state and
> external IO, but it /definitely/ can do some interesting things if you
> start wrapping your head around it.

If you (Carel) don't mind shelling out some guilders and are feeling 
nationalistic ;-), point your browser at http://www.cs.kun.nl/~clean/

Clean is like Haskell, a lazy pure FP with layout sensitive syntax. Unlike
typical Haskell implementations, Clean is actually pretty fast. Haskell
implementations I've used (GHC, Hugs) have incredibly bad performance,
not so with Clean!

> Skaller, another member of our little coterie, has an affinity for
> OCaml, whose syntax is somewhat like Haskell, but I prefer Haskell for
> asthetic and other interface reasons.  Thankfully, tastes differ.  :)

OCaml syntax is nothing like Haskell, there is no offside rule. Semantically, 
Haskell, Clean, and OCaml are all "typeful" languages, but that ain't
syntax. Oh, OCaml is fast too, like Clean, and unlike Haskell. 

I do like the fact that Haskell has a form of overloading, but OCaml will
get that too one day. In case you can't guess, OCaml is my first choice
for real work. I admit that readability is one of its weaker points :-(

-- Brian




More information about the Python-list mailing list