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
[Caml-list] Functors and classes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-08-03 (15:12)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Functors and classes
On Tue, Aug 03, 2004 at 11:06:33AM -0400, John Prevost wrote:
> The following model works for me.  The key problem here is that
> there's no way to bring a class binding in in the way you want. 
> That's not really a problem, except that you lose the ability to call
> "new".  Perhaps the Dbi interface could be changed to allow for this? 
> (Depending on how you do things, this could mean that a DbiPool could
> itself be used as a Dbi module, somehow.)

> module type ThingIntf = 
>   sig
>     type connection
>     val connect : unit -> connection
>   end

Thanks.  I understand what you're getting at here, and it kind of
reflects the way that lablgtk hides the 'new' operator too, although
I'm not sure if that's for the same reasons.  Looks like a
backwards-compatible change to the Dbi module interfaces is required.


Richard Jones.
Merjis Ltd. - improving website return on investment
"One serious obstacle to the adoption of good programming languages is
the notion that everything has to be sacrificed for speed. In computer
languages as in life, speed kills." -- Mike Vanier

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: