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
[oliver: Re: [Caml-list] Should be INSIDE STANDARD-LIB: Hashtbl.keys]
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jon Harrop <jdh30@c...>
Subject: Re: [oliver: Re: [Caml-list] Should be INSIDE STANDARD-LIB: Hashtbl.keys]
On Monday 26 April 2004 11:14 am, Richard Jones wrote:
> > ...
> Don't you think that this is a rather special case, and probably you
> should have built your own data structure?

No, that applies whenever you have a program which handles a lot of 
containers. I think containers should be "light" for that reason.

> For general purpose programming having the extra int (in STL) probably
> made sense [not that I've used C++ for years, and I don't think I'll
> be using it again].

It is of very little advantage, IMHO. If it were for a trait which required a 
similar amount of storage but which could not be easily or efficiently 
maintained from the outside then yes, sure.

IIRC, the committee's explanation for making lists carry around and update 
their own length was that newbies might not expect "size()" to be O(n). I 
don't think such arguments are constructive when designing a standard 


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