That complex function will turn out to be not all that complex at all; it can be written as just three simple functions composed together! -- Why this requires to learn Haskell, instead of ML or Scheme or Erlang?
The skill of breaking down large functions into smaller simple functions is a common skill of programming and should be practiced in all languages (C, Java, Python, etc). I'm not really sure from the article what I am supposed to gain by learning Haskell. I'm not debating the opinion that Haskell is great language to learn, but the benefits of learning the language were not clear to me after reading the article. Does…
Why Haskell Is Worth Learning
11–20 of 114 posts
Re: Why Haskell Is Worth Learning
#12That complex function will turn out to be not all that complex at all; it can be written as just three simple functions composed together! -- Why this requires to learn Haskell, instead of ML or Scheme or Erlang?
Those are all great languages. Haskell by no means has a monopoly on mind expanding features. But I think that the enforced purity of Haskell along with laziness and the powerful type system is a particularly brain twisting mix.
Re: Why Haskell Is Worth Learning
#13That complex function will turn out to be not all that complex at all; it can be written as just three simple functions composed together! -- Why this requires to learn Haskell, instead of ML or Scheme or Erlang?
The skill of breaking down large functions into smaller simple functions is a common skill of programming and should be practiced in all languages (C, Java, Python, etc). I'm not really sure from the article what I am supposed to gain by learning Haskell. I'm not debating the opinion that Haskell is great language to learn, but the benefits of learning the language were not clear to me after reading the article. Does…
Haskell will show you that when you thought you broke your code down into small functions in those languages, you were wrong in ways you currently can't even see and they're still shot through with duplication and mixing of concerns.
This is really the core of the "it changes how you program"; the environments you mention are so full of conflation of IO and mutation and state that you don't even see it, because it's just the way it is. Haskell will ungently pry those apart for you, if you stick around long enough to actually become proficient. You can take this back into other programming languages where this separation is not enforced, but I'm not convinced you can learn it where it is not enforced. The feedback cycle is so direct in Haskell ("Type Error: ...") and so diffuse in other languages (two months later "Aw crap, I should have isolated IO from non-IO better...").
(Oh you think that last parenthetical is a joke? Ha! I wish.)
Re: Why Haskell Is Worth Learning
#14That complex function will turn out to be not all that complex at all; it can be written as just three simple functions composed together! -- Why this requires to learn Haskell, instead of ML or Scheme or Erlang?
Re: Why Haskell Is Worth Learning
#15Earlier quoted context omitted.
The skill of breaking down large functions into smaller simple functions is a common skill of programming and should be practiced in all languages (C, Java, Python, etc). I'm not really sure from the article what I am supposed to gain by learning Haskell. I'm not debating the opinion that Haskell is great language to learn, but the benefits of learning the language were not clear to me after reading the article. Does…
"The skill of breaking down large functions into smaller simple functions is a common skill of programming and should be practiced in all languages (C, Java, Python, etc)" Haskell will show you that when you thought you broke your code down into small functions in those languages, you were wrong in ways you currently can't even see and they're still shot through with duplication and mixing of concerns. This is really…
Re: Why Haskell Is Worth Learning
#16I was actually trying to think if there was ever a case where I had spent time learning a language (or library) that didn't pay some sort of dividend in terms of increasing my skill as a programmer.
Re: Why Haskell Is Worth Learning
#17Re: Why Haskell Is Worth Learning
#18I investigated Haskell for a while and as long as I didn't try to add any libs it was fun. However once I started using cabal to try and manage dependencies all hell broke loose. Obviously it takes a while to get it right (looking at you SBT and Ruby gems) but Haskell has been around forever.
$ ghc-pkg list | wc -l
182Re: Why Haskell Is Worth Learning
#19I investigated Haskell for a while and as long as I didn't try to add any libs it was fun. However once I started using cabal to try and manage dependencies all hell broke loose. Obviously it takes a while to get it right (looking at you SBT and Ruby gems) but Haskell has been around forever.
I'm writing 3 different web apps, plus some command line tools in haskell. I have been working on these projects for a year now, and I've never seen any cabal problems that aren't typical problems that occur with any package manager (trying to install conflicting modules). $ ghc-pkg list | wc -l 182
It's a real problem.
Re: Why Haskell Is Worth Learning
#20I was thinking about this the other day and I think it generalizes beyond any specific language. I'm pretty sure every time I have learned a new programming language I came away a better programmer. Different programming languages (and their standard libraries) suggest that you approach problems in different ways, and that has real cognitive benefits. I was actually trying to think if there was ever a case where I ha…