Version française
Home     About     Download     Resources     Contact us    
Browse thread
How to do this properly with OCaml?
[ 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] "Just say no!" campaign against Obj [was: How to do this properly with OCaml?]
On Mon, 25 Jul 2005, Alex Baretta wrote:
> Actually, it is never for efficiency. The type-unsafeties are either due
> to marshalling--there's little we can do about it at present

Yes, I've had the same issue. There are tricks you can do to make it a bit safer
but it really needs runtime checks.

> polymorphic recursion--I'll look at your proposal based on recursive
> modules

It's actually in Xavier's paper on the experimental recursive module extension
in the proposal linked off of his web site. Not my idea at all.

It happens to be prettier (by my aesthetics checker :) except for the need to
have a "val empty : unit -> t"  in the signature rather than a "val empty : t"
but maybe that's going to be fixed one day.

I'm rather hopeful about the module system extensions, apart from the extra way
yo get polymorphic recursion. Without recursive modules functorized libraries
are a lot less useful.

--or the classic set_cdr thing in a heapsort implementation on lists.

That's just going back to the old discussion on tail recursive map (and the
like) , and using set_cdr to safely implement tail recursion modulo cons.

-- Brian