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: first class, recursive, mixin modules (was: RE: first class m odules)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-01-16 (10:36)
From: Dave Berry <dave@k...>
Subject: RE: first class, recursive, mixin modules (was: RE: first class m odules)
----Original Message-----
From: Brian Rogoff [mailto:bpr@best.com]
Sent: Friday, January 12, 2001 22:16
>That's no problem for me. Dave, in the case you mentioned, do you think
>this would this be problematic? I couldn't guess from your description.

This example has been bugging me all weekend; I can't reconstruct what it
was.  I think we wanted to write a pair of recursive functor applications,

structure S1 = F1 (S2)
and S2 = F2 (S1);

but I find it hard to believe that the two functors already existed in a
form suitable to apply this way.  More likely, I suspect, was that we wanted
to make the minimum modification to each module hierarchy to put them into
this form.  In particular, we wanted to avoid having to extract a file to be
shared at the bottom of the two hierarchies, on the grounds that this would
break the abstractions we had set up.

So what I would like from a recursive module feature is the ability to
separately compile two functors and then mutually apply them, as above.  (Or
some equivalent using forward declarations, perhaps).  I realise that in
separately compiling the two functors I might produce a less efficient
representation for the datatypes that are split across the two functors, but
I could live with that.