3 ms·
I also started looking at functional languages recently. I started with lisp (the free book) then moved to clojure (since it is lispy and probably may a better
by serverdude 16y ago
I also started looking at functional languages recently. I started with lisp (the free book) then moved to clojure (since it is lispy and probably may a better future (just a guess - i am no expert on functional languages - so no flames please.)
Just curious what is so nice / difficult about Haskell?
- lincolnq 16y agoHaskell is a research language - it was built by programming languages researchers, and lots of researchers now work with it, extend it and so on. As such, it is not "nice" in the sense that it is easy to learn how to use. In fact, there are a lot of assumptions that Haskell throws out that you may be used to. One example is strictness. When you call a function in most programming languages, you can assume that the arguments to the function are evaluated before the function is called, but that's not necessarily true in Haskell. In fact, nothing is evaluated until its result is needed for something else -- such as adding two numbers; if you need to evaluate + (an addition), then you need to know what the values of the left and right hand sides are. However, there are advantages to such assumption-breaking ideas. For example, you can have a function which produces an infinite data structure, and another function which consumes pieces of it at a later time. The functions need not know about each other at all. Such a system would be much more difficult to implement without this intrinsic laziness feature. There's a lot more to learn, much of it quite mind-bending. If you grok Haskell, you won't design programs in other languages in quite the same way, because you realize what silly assumptions were being made before.
- serverdude 16y agoThanx - sounds very intriguing. Haskell definitely would be in my list now:)