Version française
Home     About     Download     Resources     Contact us    
Browse thread
Stdlib
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jonathan Bryant <jtbryant@v...>
Subject: Stdlib
Quick (and rather random question) about the standard library.  I
noticed that, like the STL, many of the modules are very similar and
implement many of the same functions (iter, map, etc.).  Unlike the STL
or the Java Standard API, these modules are each completely
independent.  Why hasn't there been a push to do something like
functorize these modules?  For example: List, Array, Hashtbl, Set, and
Map are all collections.  Couldn't you factor out something to make it
easier to extend the library, sort of like the Java API?  Parametric
Polymorphism handles the generics of the elements of the set, so
couldn't the algorithms be factored out leaving three distinct parts
(Elements, Collections of Elements, Operations on Collections), sort of
like in the STL?

I know Java and C++ are bad words here, but you have to admit that at
least that part of Sun's library is rather well designed as is, for the
most part, the STL.  Give the devil his due, I guess... :)

--Jonathan Bryant
  jtbryant@valdosta.edu
  Student Intern
  Unix System Operations
  VSU Information Technology

"Das Leben ohne Music ist einfach ein Irrtum, eine Strapaze, ein" Exil."
("Life without music is simply an error, a pain, an exile.")
--Frederich Nietzsche

"The three cardinal values of a programmer are laziness, impatience, and
hubris."
--Perl Man Page