4 ms·
I can't speak for LISP or Logo, but her Haskell entry was completely divorced from reality. It would have been a better fit (and somewhat appropriate) if she'd
by jmillikin 16y ago
I can't speak for LISP or Logo, but her Haskell entry was completely divorced from reality. It would have been a better fit (and somewhat appropriate) if she'd just copy-pasted the OCaml entry.
- chc 16y agoIt's a reference to Haskell's extremely elaborate Turing-complete type system and the many contrarian (for lack of a better word) choices made in the language design — purity, default laziness, utter rejection of OO. Most people are unlikely to have used a language like that before. Even OCaml lacks those qualities. And I don't think anyone would disagree that Haskell is extremely serious about safety ("prophylactic techniques") and carefully marking impure portions of the program by tainting them with IO. The only part of the Haskell description I didn't get is the "person you're with no longer resembles Haskell."
- jmillikin 16y ago> the many contrarian (for lack of a better word) choices made in the language design — purity, default laziness, utter rejection of OO. Haskell isn't a pure language. Its only notable characteristic regarding purity is that it's possible to annotate whether some code is pure or not. Working with impure (and sometimes downright unsafe) is common, encouraged, and widespread. Especially in real-world code. Haskell doesn't utterly reject OO; if anything, its combination of typeclasses and nearly-free threads brings it closer to Smalltalk or Erlang than many pretend-OO languages (C++, Java, C#). Default laziness is one of the few truly weird parts of Haskell, and I sincerely doubt the author has done anything serious enough to worry about the evaluation model.
- kenjackson 16y agoHaskell isn't a pure language. Its only notable characteristic regarding purity is that it's possible to annotate whether some code is pure or not. Isn't this a requirement (the use of the type system for annotating purity), not something that is just "possible". And isn't that what people generally mean by its purity?
- jmillikin 16y agoIMO, a pure language would be one which is incapable of representing impure code. Or at least, where it's very hard. I don't know where the line lies, but I strongly feel that any language that supports manual memory management, pointers, and mutable variables can't properly be called "pure". Some people get confused between purity and expressiveness. Inexpressive languages like C require using impure constructs to represent fundamentally pure constructs. More expressive languages like Python don't need as many impure workarounds. Haskell, as a very expressive language, can do amazing things in pure code that other languages must resort to impurity for. If you want a pure language, look into Agda or Coq.
- Dunbar 16y agoAny language that is only pure is about as useful as write-only memory. Haskell was historically pure and had side effects added as a way to interact with the world. The language enforces (discounting unsafePerformIO) the separation of pure and impure code. That is sufficient to label any practical language pure.
- jmillikin 16y ago> Any language that is only pure is about as useful as write-only memory. That's actually not true -- you can write the core of a system in a pure language, then use that pure core as a library in larger applications. Pure languages like Coq and Agda are often not Turing-complete, so various sorts of verification and proofs can be applied more easily.
- wozer 16y agoI agree in general, but which of "purity, default laziness, utter rejection of OO" does OCaml have?
- chc 16y agoD'oh, none. I originally wrote "…has none of them," looked back and saw "OO," and cleverly "corrected" myself. Thanks for catching that.
- eru 16y ago> It's a reference to Haskell's extremely elaborate Turing-complete type system [...] Haskell's type system is decidable. Thus it can't be Turing complete.
- jmillikin 16y agoWith the right combination of language extensions, you can force Haskell's type system to turing-completness; see http://www.haskell.org/haskellwiki/Type_SK http://www.haskell.org/haskellwiki/Type_SK
- eru 16y agoYes. But if nothing else is said, I expect people to talk about the standard Haskell 98. C++'s type system is isomorph to lambda calculus even without extensions, and nobody made this joke there.