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 slow?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-06-21 (13:32)
From: Judicael Courant <Judicael.Courant@l...>
Subject: Re: slow?
On 19 jun, David Monniaux wrote:
> Perhaps including a function would be easier.

Adding a function "compare" to the String module would be a very good
idea indeed. May I suggest that a "type t = string" be added also ?

Hence, one could write

module StringSet = Set.Make(String)

module StringMap = Map.Make(String)

instead of

module StringSet =
             type t = string
             let compare = compare

module StringMap =
             type t = string
             let compare = compare

(This could be done for modules Char, Int32, Int64 and NativeInt also)

By the way, one also could add functions "equal" and "hash" to these

(+33) (0)1 69 15 64 85
"Montre moi des morceaux de ton monde, et je te montrerai le mien"
Tim, matricule #929, condamné à mort.