3 ms·
I've found my Haskell code much more likely to do what I want the first time it is accepted by the compiler than Clojure, CL or Scheme. On the other hand, I fin
by Zak 17y ago
I've found my Haskell code much more likely to do what I want the first time it is accepted by the compiler than Clojure, CL or Scheme. On the other hand, I find it easier to play around with things in a Lisp REPL than GHCi. Maybe that's because I have more experience with Lisp than Haskell, but I suspect there's something inherent. I don't think one approach is better than the other, but each has strengths that help with certain kinds of development.
- skew 17y agoFor one, GHCi doesn't even provide the whole language. You can't define new types, classes, or instances, and as a matter of syntax you have to use explicit braces or semicolons for multi-line things. I haven't used it much, but O'Caml's REPL is better on these counts. As far as semantics, GHCi doesn't let you redefine a function and continue working, largely, I suspect, because Haskell doesn't describe how that should work. Conversely, if you keep your source open in an editor and reload, then you can change classes, macros, etc, but you lose your state across reloading (declaring top-level values to set up your testing state can help, but it's less fluid).