4 ms·
It seems to me that Clojure exists on the idealogical extreme opposite of Haskell (standing next to it's little buddy Scala). How did you go from one extreme t
by runT1ME 14y ago
It seems to me that Clojure exists on the idealogical extreme opposite of Haskell (standing next to it's little buddy Scala).
How did you go from one extreme to the other and pick it as your 'primary' language.
Isn't it like saying "I really like President Obama, but my favorite politician is Rick Santorum".
- aphyr 14y agoDifferent techniques are useful for different problems. Sometimes you really want a powerful type system: it makes invariants for safety, concision, and speed available that you can't get any other way. Other times you want a more dynamic type system: especially where you don't really know the full shape of the problem yet. This is a choice you have to make, as a language: where on the type continuum do you fall? It's partly technical, partly cultural. When done well, it pervades the language offering tremendous power--but it is a choice. In many other respects, Haskell and Clojure are ideologically similar. Both emphasize immutability, referential transparency, higher-order functional programming, and laziness. Clojure chooses to layer this on top of a mutable core; Haskell uses monadic combinators. Again, there's a difference of perspective. Haskell's technical emphasis on purity makes powerful invariants available to the compiler, but requires some serious type acrobatics for concurrent stateful operations. Clojure gains the ability to drop to mutability in a simpler way, but places the burden on the programmer to keep track of side effects: relying on culture to maintain sane guarantees.
- ema 14y agoThey have both have immutable data structures and i realized just now, that is after GC the second most important feature i want in a high level language.