Subj : Re: any function to handle this kind of counting? To : comp.programming From : Jon Harrop Date : Sat Jul 30 2005 09:14 pm Alex Fraser wrote: >> No, that is not similar to the OCaml I posted because the OCaml programs >> are self-contained and either use lists (which are native to the >> language) or data structures found in the OCaml stdlib. > > Why does that make a difference? Having common definitions in a standard library is beneficial for many reasons, primarily: 1. Stability (many relevant bits of OCaml's stdlib have been formally proven correct using theorem provers and will have been used by many more people than a "home grown" C implementation). 2. Generality (what happens if you want to combine two difference C programs which use two different "home grown" set implementations?). 3. Efficiency (a "home grown" set implementation in C is unlikely to match the performance of OCaml's set implementation). 4. Capability (OCaml's built-in hash function can traverse any data structure). -- Dr Jon D Harrop, Flying Frog Consultancy http://www.ffconsultancy.com .