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." http://www.catb.org/~esr/writings/cathedral-bazaar/cathedral-bazaar/ar01s06.html
best regards, -- -- Johannes Waldmann, Tel/Fax: (0341) 3076 6479 / 6480 -- ------ http://www.imn.htwk-leipzig.de/~waldmann/ ---------
_______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell