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] Do you like files as modules?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-10-07 (19:45)
From: William Lovas <wlovas@s...>
Subject: Re: [Caml-list] Do you like files as modules?
On Thu, Oct 07, 2004 at 01:12:46PM +1000, skaller wrote:
> In both Ocaml and Python, the module name is also
> coupled to the filename.
> Which technique do you prefer? Why? What advantages
> and disadvantages does each have?

Some people say that it's a misstep to couple the programs semantics with
that of the operating system's filesystem.  Personally, however, i like
being able to tell which file a function is defined in while i'm reading
someone else's source code.  Conventions go a long way, but language
restrictions can't be ignored.

Unfortunately, module *types* are not treated the same way, so you're
forced to refer to things like Map.S and whatnot..

> How is the 
> compiler architectural model coupled to program
> semantics, optimisation, separate compilation,
> and linkage, and should it be?

This is a tough question, i think, and I like the way the O'Caml folks have
answered it.  Standard ML gets around this question by *not* answering it,
so every compiler implementation has its own idea of how to do things.
This makes it hard (impossible?) to write Standard ML programs that build
uniformly under any implementation of the language.  (In some degenerate
sense, i suppose the same is true of O'Caml, though, since it has only one


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