
9 Mar
2017
9 Mar
'17
10:07 a.m.
Dear Cafe, I wrote a text (well, you might call it a rant) on the tragic over-use of lists in Haskell, based on my experience in programming and teaching. http://www.imn.htwk-leipzig.de/~waldmann/etc/untutorial/list-or-not-list/ * If your program accesses a list by index (with the !! operator), then your program is wrong. * If your program uses the length function, then your program is wrong. * If your program sorts a list, then your program is wrong. * If you wrote this sort function yourself, then it is doubly wrong. * The ideal use of a list is such that will be removed by the compiler. * The enlightened programmer writes list-free code with Foldable. Have fun reading, and avoiding lists from here on! - J.W.