Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Recursive lists
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: brogoff <brogoff@s...>
Subject: Re: [Caml-list] About Obj (was Recursive lists)
On Wed, 13 Oct 2004, Alex Baretta wrote:
> The need for a List (or Cyclic_list) module encapsulating the
> abstraction of a cyclic list emerges when we try to build an input
> data-structure to feed our algorithm. The use of Obj within a specific
> module is perfectly acceptable so long as it is needed to implement
> functionality which cannot be achieved in the core language. The example
> of the tail recursive implementation of List.map is pertinent, and shows
> the point.

I remembered shortly after I asked that Alice ML also provides a way to handle
these tail recursive (modulo cons) functions by providing a library for
Prologish logical variables called "promises" in that dialect. Neat idea, and
useful for more than tail recursive lists, but I wonder how efficient the
implementations are.

> You might have noticed that Caml breeders use Obj fairly liberally when
> it is needed to achieve a higher of abstraction which cannot be modeled
> in the core language.

Good point, but I hope every Caml fan accepts these uses as being neccesary
compromises of the moment that can one day be eliminated by a stronger core
language.

-- Brian

-------------------
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