English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
(Mostly) Functional Design?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-07-18 (15:27)
From: Alex Baretta <alex@b...>
Subject: Re: [Caml-list] (Mostly) Functional Design?
alphablock wrote:
> May be there are many less FP solutions than OOP solutions just because
> there are many less FP problems than OOP problems.
> Or may be i am plain naive, who knows...
> - damien

I would not say so. It is just the problems tend to admit a fairly
simple--although generally not trivial solution. This does not justify a
large scale attempt to catalog all FP "design patterns" in a single
book. Let me try to list a few I can readily think of.

* Indefinite recursion through tail call optimization
* Systematic elimination of explicit or implicit (recursive) cycles
whenever an iterator is available. If an iterator is not available for a
given data structure, it is often advisable to define one.
* Order preservation of sequential data structures such as lists through
 the use of an even number of order reversing tail-recursive algorithms.
* Late-binding of recursive calls
* Multi-stage programming through partial evaluation

These ideas are more general coding strategies requiring a specific
design from the programmer, rather than parametrized design patterns
abstracting from the (absence of) cognitive abilities of the programmer.


Baretta DE&IT
A division of Baretta SRL

tel. +39 02 370 111 55
fax. +39 02 370 111 54

Our technology:

The Application System/Xcaml (AS/Xcaml)

The FreerP Project