107 points · by hawkharris · 12y ago · 60 comments
All of the "Functional Pearls" papers are worth a read, but Bird's book is such a compressed, convenient, powerful collection of advanced functional problem solving style that I think anyone interested in "thinking" functionally should strive to read it.
It's not exactly for the faint of heart, to be clear. Bird's idea is that we can establish certain mathematical rules which allow us to transform "the simplest thing which could possibly be correct" to an efficient program through a series of steps, each one maintaining correctness as an invariant.
[0] http://www.amazon.com/Pearls-Functional-Algorithm-Design-Ric...
Understanding join is pretty valuable for understanding Monads too.
And then go study Monads because why not. They're kind of cool, too.
I also toot F#'s horn because it has an amazing resource for learning how to use functional style in your programs: http://fsharpforfunandprofit.com/site-contents/
A few pages on that site did more for me regarding functional programming than the entirety of LYAH did, and it also has a very nice monad tutorial: http://fsharpforfunandprofit.com/posts/computation-expressio...
http://bitemyapp.com/posts/2014-03-25-when-nested-io-actions...
It seems that 'this' here must not refer to the parent post (https://news.ycombinator.com/item?id=7538461):
> Also, if you don't want to make the full leap into "PURE EVERYTHING MUST STAY CLEAN DONT BREAK THE RULES" style code, try Haskell. Imperative programming in Haskell is great! The language evaluation rules may be purely function, but your code doesn't need to be.
with which you seem to be agreeing. Perhaps it refers to the grandparent post (https://news.ycombinator.com/item?id=7537877), specifically to its implicit claim that Haskell programming involves "PURE EVERYTHING MUST STAY CLEAN DONT BREAK THE RULES"?
I really like Standard ML in that sense. Unfortunately, seems to be fading away in sense of popularity.
F# is a .NET language.
The language can compile into CIL, javascript, and a handful of other build targets.
I don't believe this is true, at least not easily.
Anyway, I needed to do a small .NET work two years ago. I choose to try F#. It was the first and only time I got highly please by another language features. Actually, I've to admit that I was pissed of : F# may well be a better language than Haskell.
http://channel9.msdn.com/Series/C9-Lectures-Dr-Don-Syme-Intr...
http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Func...
Let's just all go through our favorite 3 year old books and post HN articles about every chapter that strikes our fancy why don't we?
main = print "Hello, world!"
Is that really interesting enough to rush to?In case of LYAH (or Haskell in general) you have GHCi at hand, an interactive interpreter. That's what LYAH sets up in the very first chapter, and uses throughout the rest of the book.
How can anyone seriously code in a language which introduces new kind of bugs which cannot be detected by any test until running in production on real data when it is already too late?
- Haskell does not have "a new kind of bugs". It's an ordinary programming language with ordinary bugs.
- The bugs you put in your program are not any more or less undetectable before production compared to unstable than they are in other languages.
I agree that Haskell has some good (old) ideas and it is pleasant to Sunday programmers.
Judging from the other comments, it's clear you have an axe to grind. I'm leaving this thread as well.