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
Re: [Caml-list] Breaking out of iterative loops
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-05-02 (13:34)
From: Markus Mottl <markus@o...>
Subject: Re: [Caml-list] Breaking out of iterative loops
On Thu, 02 May 2002, Krishnaswami, Neel wrote:
> Markus Mottl [mailto:markus@oefai.at] wrote:
> > I second this. Does anybody here really benefit from such cyclic
> > structures?
> Somewhat to my surprise, I can answer yes:
>   | Rec(name, n, body) -> 
>       let rec c = Closure(n, body, r')
>       and r' = (name, c) :: r in
>       c

> Using cyclic structures means I don't have to dink around with 
> mutable references and all the headaches they bring, and so it's
> very handy when prototyping. 

Ok, I agree that this is a nice solution. It's still funny that all
people mentioned environment handling with recursion as only example.
I am not sure whether this is justification enough to have this extra
feature in the language...

Markus Mottl

Markus Mottl                                             markus@oefai.at
Austrian Research Institute
for Artificial Intelligence                  http://www.oefai.at/~markus
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners