Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* alternative module systems
@ 2000-08-14 15:17 Markus Mottl
  2000-08-18 16:36 ` Brian Rogoff
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Mottl @ 2000-08-14 15:17 UTC (permalink / raw)
  To: OCAML

Hello,

having just looked at a few examples of the new module system as
implemented by Claudio Russo in Moscow ML, I wonder whether people at INRIA
have already considered it?

It supports higher order functors, mutually recursive modules, even first
class modules. The module examples in the Moscow ML distribution also
demonstrate the new capabilites using the bootstrapping methods explained
in Okasaki's book on "Purely Functional Datastructures". This is really
neat stuff!

I have no idea whether there are any caveats to this solution, but it looks
pretty general. Any comments whether something similar could be implemented
in OCaml? As it seems, the solution is a true superset of the previous
module system used in SML.

Best regards,
Markus Mottl

-- 
Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: alternative module systems
  2000-08-14 15:17 alternative module systems Markus Mottl
@ 2000-08-18 16:36 ` Brian Rogoff
  2000-08-18 16:48   ` Markus Mottl
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Rogoff @ 2000-08-18 16:36 UTC (permalink / raw)
  To: Markus Mottl; +Cc: OCAML

On Mon, 14 Aug 2000, Markus Mottl wrote:
> Hello,
> 
> having just looked at a few examples of the new module system as
> implemented by Claudio Russo in Moscow ML, I wonder whether people at INRIA
> have already considered it?
> 
> It supports higher order functors, mutually recursive modules, even first
> class modules. The module examples in the Moscow ML distribution also
> demonstrate the new capabilites using the bootstrapping methods explained
> in Okasaki's book on "Purely Functional Datastructures". This is really
> neat stuff!

Yes it is. I wonder what else those features will enable. In particular,
the use of first class structures to configure a system at run
time looks really useful to me. This is one of those things I'd normally
be disposed towards doing with classes. I find it disturbing though, since
my mental model of modules is that they are "second class". 

Also, there is the age old (in web years :) desire to have mutually
recursive types which span module boundaries, and it is possible in this 
system. I guess there have been papers describing other solutions, but 
a having a real implementation is a win.

> I have no idea whether there are any caveats to this solution, but it looks
> pretty general. Any comments whether something similar could be implemented
> in OCaml? As it seems, the solution is a true superset of the previous
> module system used in SML.

It's a superset of the OCaml module system too, at least that part that is 
comparable with SML (obviously SML doesn't have classes and such). 

-- Brian




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: alternative module systems
  2000-08-18 16:36 ` Brian Rogoff
@ 2000-08-18 16:48   ` Markus Mottl
  0 siblings, 0 replies; 3+ messages in thread
From: Markus Mottl @ 2000-08-18 16:48 UTC (permalink / raw)
  To: Brian Rogoff; +Cc: OCAML

> Yes it is. I wonder what else those features will enable. In particular,
> the use of first class structures to configure a system at run
> time looks really useful to me. This is one of those things I'd normally
> be disposed towards doing with classes. I find it disturbing though, since
> my mental model of modules is that they are "second class". 

It also took me a while to wind my brain around this concept. Given that
modules have some nice properties that do not hold for classes (objects),
being able to create them at runtime and even pass them around as values
looks quite promising. To my knowledge, the described approach is said to
be formally very clean.

> It's a superset of the OCaml module system too, at least that part that is 
> comparable with SML (obviously SML doesn't have classes and such). 

Indeed, it looks as if one could switch "below the hud" without breaking
code, doesn't it?

Best regards,
Markus Mottl

-- 
Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-08-20 16:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-14 15:17 alternative module systems Markus Mottl
2000-08-18 16:36 ` Brian Rogoff
2000-08-18 16:48   ` Markus Mottl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox