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
Wanted: your feedback on the hierarchy of OCaml Batteries Included
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-11-19 (06:29)
From: David Teller <David.Teller@u...>
Subject: Re: [Caml-list] Wanted: your feedback on the hierarchy of OCaml Batteries Included

On Tue, 2008-11-18 at 23:30 +0000, Jon Harrop wrote:
> On Tuesday 18 November 2008 09:56:18 David Teller wrote:
> I only have one major concern: you say "with the large number of modules 
> involved, we would need a hierarchy of modules" but the number of modules 
> involved is tiny (a few dozen in OCaml compared to tens or even hundreds of 
> thousands in any industrial-strength language) because OCaml has very few 
> libraries. Yet your module hierarchies are already enormous and often require 
> a longer sequence of modules to reach simple functionality than is required 
> in a comparatively-huge library like .NET.

Well, we're trying to be future-proof. Don't you think we should?

> To me, the most striking example is printf which is just printf in F#, 
> Printf.printf in OCaml and is now Text.Printf.printf in OCaml+Batteries. 
> Surely this is a step in the wrong direction?

Well, if you it's just the matter of [printf], we can add it to
[Batteries.Standard] to import it in the standard namespace. The biggest
question is how many things we want imported in that standard namespace.
Or you could start your files with [open Text.Printf] or [module P =
Text.Printf] or any similar combination.

Oh, and, [Printf.printf] works, too. This is one of the modules which
have a shortcut to their path in the hierarchy, to mirror the base

David Teller-Rajchenbach
 Security of Distributed Systems
 Angry researcher: French Universities need reforms, but the LRU act brings liquidations.