4 ms·
What projects in Haskell are considered to have well-written, idiomatic code? I looked at some about a year ago but almost all projects I saw had lot of IO and
by asgard1024 11y ago
What projects in Haskell are considered to have well-written, idiomatic code?
I looked at some about a year ago but almost all projects I saw had lot of IO and bangs everywhere.
- wereHamster 11y agoOf course you'll see lots of IO. An application without side effects is rather useless.
- kqr 11y agoReal-world code (which is what most projects consist of) is rarely fully idiomatic and well-written, because it contains fixes to weird edge cases only some users experience, performance optimisations and such.
- plonh 11y agoYou mean production code doesn't look as pretty and toy code. Production code that performs well is well written and idiomatic if it follows the common practices of production code.
- skm 11y agoDon Stewart has given possibly the best answer to this question on StackOverflow: http://stackoverflow.com/questions/6398996/good-haskell-source-to-read-and-learn-from/6399082#6399082 http://stackoverflow.com/questions/6398996/good-haskell-sour...
- asgard1024 11y agoThanks, I almost lost hope that I will get a sensible answer. I don't buy the argument that real world code cannot be pretty; what would be the reason to use Haskell, then?
- plonh 11y agoBangs are well written and idiomatic Haskell code. Haskell is a default-lazy language. Good code uses lazy algorithms (to avoid wasted work) and strict data structures (to avoid space leaks), so efficient data structures need the bangs.