Why I never finish my Haskell programs
blog.plover.com
Why I never finish my Haskell programs
1–10 of 228 posts
Re: Why I never finish my Haskell programs
#2 Poly [1, -3, 0, 1]
Should be: Poly [1, 0, -3, 1]
EDIT: My mistake.Re: Why I never finish my Haskell programs
#3Conversely, languages like Java, C++ and Python (if you use classes), make it very easy to write simple things without abstraction, but virtually all use of abstraction goes off the rails immediately and everything shoots you in the foot, so that good abstraction is not even really a thing at all.
Pick your poison!
Re: Why I never finish my Haskell programs
#4I think there's an error in the first example. Poly [1, -3, 0, 1] Should be: Poly [1, 0, -3, 1] EDIT: My mistake.
Re: Why I never finish my Haskell programs
#5Though it's true that Haskell is easy to put you into a mindset where you want to simplify and generalize the code as much as possible, leading to wasted time on overly general solutions. Which shouldn't be the case, because e.g. if you want to extend the solution from lists to traversables, Haskell gives you the confidence to safely refactor the method at a later time.
Re: Why I never finish my Haskell programs
#6Re: Why I never finish my Haskell programs
#7I think there's an error in the first example. Poly [1, -3, 0, 1] Should be: Poly [1, 0, -3, 1] EDIT: My mistake.
Re: Why I never finish my Haskell programs
#8I've never understood this. Unless you write a library that you plan to publish, or already have actual cases where you need a more general solution, why spending time trying to generalise code instead of switching to the next task?
Re: Why I never finish my Haskell programs
#9>I ought to be able to generalize this I've never understood this. Unless you write a library that you plan to publish, or already have actual cases where you need a more general solution, why spending time trying to generalise code instead of switching to the next task?
Of course, all of this is purely speculation on my part.
Re: Why I never finish my Haskell programs
#10The general principle does come in handy elsewhere, though. Doing the most useful work with the minimum power is a generally useful skill. I get a lot of mileage out of it in other languages, because across a couple hundred modules, the difference between modules that have minimum dependencies and modules that carelessly overuse power becomes quite substantially different in character.