Browse thread
[oliver: Re: [Caml-list] Should be INSIDE STANDARD-LIB: Hashtbl.keys]
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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 library... Cheers, Jon. ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners