Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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 [] 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                                   
Austrian Research Institute
for Artificial Intelligence        
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: