tag:blogger.com,1999:blog-21123659.post3442265424802352158..comments2023-05-03T09:30:17.042+02:00Comments on koweycode: haskell-jikoweyhttp://www.blogger.com/profile/11175806459477851520noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-21123659.post-36899653256812827912009-02-01T09:25:00.000+01:002009-02-01T09:25:00.000+01:00Argh, you're making me dither! Don't make me dithe...Argh, you're making me dither! Don't make me dither :-Dkoweyhttps://www.blogger.com/profile/11175806459477851520noreply@blogger.comtag:blogger.com,1999:blog-21123659.post-52849610636354653672009-02-01T01:17:00.000+01:002009-02-01T01:17:00.000+01:00I understand the appeal of "high-level to low-leve...I understand the appeal of "high-level to low-level" aka "leave the details til the end." As a student of these problems in a variety of languages over a long time, however, I'm afraid that I must respectfully disagree.<BR/><BR/>In the English-speaking world, at least, we learn to read left-to-right top-to-bottom at an early age. It becomes an ingrained habit. And when we learn to read and write stories, we tell things as we need them, rather than saving details until the end.<BR/><BR/>I'm convinced that, as a result of all this training, if you want your code to tell a story, you should introduce things as they become important, and not defer. This means that the "details" of your program will be introduced when they become timely; they may be intermixed, but will tend to be earlier rather than later.<BR/><BR/>I think that making Haskell's "let" syntactically harder to use than its "where" was a cognitive mistake, and has encouraged an "upside-down" style of programming that is harder for novices to pick up and harder for everyone to work with.<BR/><BR/>Of course, I haven't done any formal research, and your mileage may vary.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-21123659.post-59343420950499949312009-01-31T21:39:00.000+01:002009-01-31T21:39:00.000+01:00Thanks for the new buckets! (and the comments)Thanks for the new buckets! (and the comments)koweyhttps://www.blogger.com/profile/11175806459477851520noreply@blogger.comtag:blogger.com,1999:blog-21123659.post-36198941843336812342009-01-30T19:57:00.000+01:002009-01-30T19:57:00.000+01:00Buckets could be made better (though slightly more...Buckets could be made better (though slightly more verbose) as follows:<BR/><BR/>buckets :: Ord b => (a -> b) -> [a] -> [ (b,[a]) ]<BR/>buckets =<BR/> map (first head)<BR/> . map unzip<BR/> . groupBy ((==) `on` fst)<BR/> . sortBy (compare `on` fst)<BR/> . map (\x -> (f x, x))<BR/><BR/><BR/>This way you compute 'f' only once for each element.Christophe Poucethttps://www.blogger.com/profile/02320035941417593372noreply@blogger.comtag:blogger.com,1999:blog-21123659.post-20851706714700416122009-01-30T19:09:00.000+01:002009-01-30T19:09:00.000+01:00I, some random dude on the internet, have recently...I, some random dude on the internet, have recently come to basically the same conclusions you just listed. So I guess we can both feel happy about it.Unknownhttps://www.blogger.com/profile/17914875474227854117noreply@blogger.comtag:blogger.com,1999:blog-21123659.post-15858493908066505232009-01-30T17:36:00.000+01:002009-01-30T17:36:00.000+01:00Heh, I wish I knew! I think I'm leaning more towa...Heh, I wish I knew! I think I'm leaning more towards smooshing (Xml), no comments on what order bits of names should be in :-)koweyhttps://www.blogger.com/profile/11175806459477851520noreply@blogger.comtag:blogger.com,1999:blog-21123659.post-69424514062013665582009-01-30T17:30:00.000+01:002009-01-30T17:30:00.000+01:00So, is it xmlParse or parseXML?So, is it xmlParse or parseXML?Björn Buckwalterhttps://www.blogger.com/profile/14027110650075268096noreply@blogger.com