23 ms·
I for one prefer the more "algebraic" implementation. Why worry about performance when you get theorems for free?! Monads.
by seliopou 13y ago
I for one prefer the more "algebraic" implementation. Why worry about performance when you get theorems for free?!
Monads.
- dinkumthinkum 13y agoYour users might care ...
- deleted 13y ago[deleted]
- 10098 13y agohttp://imgur.com/QIVtdxM.jpg http://imgur.com/QIVtdxM.jpg
- adamnemecek 13y agoYou would fit right in at http://reddit.com/r/programmingcirclejerk http://reddit.com/r/programmingcirclejerk :-)
- oakwhiz 13y agoWhy not upgrade the compiler to detect the algebraic implementation and optimize it to the buffer implementation?
- cliffbean 13y agoBecause if it's a common pattern, then it's nice to put it in a common library anyway, instead of having everyone write it out by hand. It makes the code cleaner and more efficient. Win win!
- tikhonj 13y agoIt actually does this in a bunch of cases; see Haskell's stream fusion[1] and rewrite rules in general[2] for examples. However, there aren't any rewrite rules for list-based code, at least with the standard library. Rewrite rules are generally used for libraries designed explicitly with performance in mind like Vector and Bytestring; the standard String type and the Prelude don't fall into this category. [1]: http://stackoverflow.com/questions/578063/what-is-haskells-stream-fusion http://stackoverflow.com/questions/578063/what-is-haskells-s... [2]: http://www.haskell.org/ghc/docs/7.0.1/html/users_guide/rewrite-rules.html http://www.haskell.org/ghc/docs/7.0.1/html/users_guide/rewri...
- lmm 13y agoObvious follow-up question: why does cabal not use more performance-oriented libraries? Does it have to avoid depending on anything because it's the dependency manager?
- kenko 13y agoI for one prefer the (appropriately) unthinking anti-intellectualism. Hacker News.
- coherentpony 13y agoI think (s)he was being sarcastic.
- mintplant 13y agoAnd that's the anti-intellectualism.
- hdevalence 13y ago"And make no mistake: irony tyrannizes us. The reason why our pervasive cultural irony is at once so powerful and so unsatisfying is that an ironist is impossible to pin down. All irony is a variation on a sort of existential poker-face. All U.S. irony is based on an implicit "I don't really mean what I say." So what does irony as a cultural norm mean to say? That it's impossible to mean what you say? That maybe it's too bad it's impossible, but wake up and smell the coffee already? Most likely, I think, today's irony ends up saying: "How very banal to ask what I mean." Anyone with the heretical gall to ask an ironist what he actually stands for ends up looking like a hysteric or a prig. And herein lies the oppressiveness of institutionalized irony, the too-successful rebel: the ability to interdict the question without attending to its content is tyranny. It is the new junta, using the very tool that exposed its enemy to insulate itself." From David Foster Wallace's "E Unibus Pluram".
- haberman 13y agoOnly if you believe that "intellectualism" means "favoring more abstract approaches regardless of practical concerns."