4 ms·
Clojure is a great language, but there really is a difference between functional and "pretty" functional; e.g. as in, I know 100% sure that this function has no
by alipang 13y ago
Clojure is a great language, but there really is a difference between functional and "pretty" functional; e.g. as in, I know 100% sure that this function has no side-effects.
Static typing can do a lot of good, but the stricter semantics of Haskell also goes a long way into writing code with fewer bugs.
- 0xdeadbeefbabe 13y agobah side effects what useful thing can you do without side effects? The only way to have no side effects is to frame the problem in a certain way.
- alipang 13y agoHaskell has support for side-effects. It's just able to state the property that something is a 100% pure function, and also makes it very easy to write such code a lot of the time.
- mercurial 13y agoNobody can agree on the definition of a functional language. AFAIK, so-called "functional" languages like F# or O-Camel allow arbitrary side effects, unlike Haskell.
- mtrimpe 13y agoThat's why you'd call Haskell a 'purely functional' language.
- 0xdeadbeefbabe 13y agoAny function changes the state of your machine, and you have to pretend your computer doesn't have memory or registers in order for this pure function side effect free stuff to make sense. When you said "know 100%" my ability to accept abstractions like that turned off.
- tieTYT 13y agoIMO, that has nothing to do with it. Especially because you often do know 100% that this function has no side-effects. It's because with Haskell you find a ton of errors at compile time and Clojure finds most issues at runtime.