[Haskell] Annoying naming clashes
waldmann at imn.htwk-leipzig.de
Tue Jun 15 04:26:11 EDT 2004
John Meacham wrote:
> 1. define the data structures you think you will need or
> 2. define the class/interface your data structures will have
if you want to take the "prototyping" route,
then indeed do 1. first and then 2.,
but of course first 2. then 1. gives better code
right from the start.
I mean, you don't write a sort function for strings,
another for doubles etc. only to discover later
that you should use the Ord interface (erm, class).
OTOH, if you do the complete sequence 1+2+1
then you can call it "refactoring"
in order to be buzzword compliant.
> however an experienced haskell programmer might realize the data
> structure is not needed and just write
as has been said already, the programmer should indeed *use*
such structures, and it's the job of the *compiler*
to figure out where and how they could be removed.
as Eric Raymond puts it, "Smart data structures and dumb code
works a lot better than the other way around."
-- Johannes Waldmann, Tel/Fax: (0341) 3076 6479 / 6480 --
------ http://www.imn.htwk-leipzig.de/~waldmann/ ---------
More information about the Haskell