Because they're elegant. Haskell is a conceptual and syntax mess.
Why I still reach for Lisp and Scheme instead of Haskell
61–70 of 172 posts
Re: Why I still reach for Lisp and Scheme instead of Haskell
#62Earlier quoted context omitted.
Lisp was meant to be written with M-expressions instead of S-expressions anyway.
M-expressions were never implemented and never used.
Re: Why I still reach for Lisp and Scheme instead of Haskell
#63> You can pause, inspect objects, change values, and even redefine a broken function on the fly to test a fix in any environment (yes even in production, while running). I see this mentioned often, and it sounds amazingly useful (especially the part about fixing in production!). But how truly widespread is it among the Lisp dialects to be able to connect to a running program, debug, and hotfix it? I understand Common…
Re: Why I still reach for Lisp and Scheme instead of Haskell
#64> You can pause, inspect objects, change values, and even redefine a broken function on the fly to test a fix in any environment (yes even in production, while running). I see this mentioned often, and it sounds amazingly useful (especially the part about fixing in production!). But how truly widespread is it among the Lisp dialects to be able to connect to a running program, debug, and hotfix it? I understand Common…
it's been my experience that when most people say "Lisp does this that or the other", what they usually mean is "Common Lisp does this that or the other". Often there's an implicit "with SLIME" in there as well
Re: Why I still reach for Lisp and Scheme instead of Haskell
#65Earlier quoted context omitted.
For all practical purposes, the syntax of Lisp isn't just a cosmetic choice, though.
Lisp was meant to be written with M-expressions instead of S-expressions anyway.
Re: Why I still reach for Lisp and Scheme instead of Haskell
#66I don't believe monads are a "heavy handed abstraction" and that's what prevents people from prototyping in Haskell. What really prevents people from writing in Haskell at a reasonable speed is the poor language design. Programming languages are supposed to aid in reading by emphasizing structure. It's important to emphasize that a particular group of "words" constitutes a function call, or a variable definition, or…
Re: Why I still reach for Lisp and Scheme instead of Haskell
#67Earlier quoted context omitted.
I don't see how: Racket: > (define (fact n) (if (= n 1) 1 (* n (fact (- n 1))))) > (fact 6) 720 OCaml: # let rec fact = function | 1 -> 1 | n when n > 1 -> n * (fact (n - 1)) in fact 6;; - : int = 720
Whenever someone complains about not being able to use a slightly different syntax, I assume they just don't have any neuroplasticity anymore.
Re: Why I still reach for Lisp and Scheme instead of Haskell
#68Earlier quoted context omitted.
> inner expressions must be indented more Not to support the parent comment, which I disagree with, but If you use multi-line let-bindings, those require that you indent not just more than the previous line, but as much as the first token after the let keyword on the previous line. It’s a very strange rule, all the more surprising because it’s inconsistent even with the rest of the language. It is totally avoidable i…
So you want to line the equals signs up or similar? let f = 9 fo = 10 foo = 123 in f+fo+foo vs. let f = 9 fo = 10 foo = 123 in f+fo+foo
someValue = let f = 9
fo = 10
foo = 123
in f+fo+foo
rather than: someValue = let f = 9
fo = 10
foo = 123
in f+fo+foo
I think it used to be the case that it had to be indented past the `=` or the `let` even if it was't on the same line. Note also that `in` has to be indented past `someValue`, but doesn't need to be indented as far `let`.This is fine:
someValue = let
f = 9
fo = 10
foo = 123
in f+fo+foo
So, it is possible to land on sane indentation, but the parser is much pickier than, e.g., Python's off-sides rule, so it takes some trial and error for new users to find it, and it can be frustrating if you're just temporarily modifying an expression to quickly try something out.I honestly think it would be less surprising if the parser just disallowed writing the first binding on the same line as the `let` entirely, treating it only as a block, but some people (bewilderingly) do seem to prefer to write their code with the excessive indentation (I'd imagine with editor support, rather than manually maintaining the spacing).
Re: Why I still reach for Lisp and Scheme instead of Haskell
#69> You can pause, inspect objects, change values, and even redefine a broken function on the fly to test a fix in any environment (yes even in production, while running). I see this mentioned often, and it sounds amazingly useful (especially the part about fixing in production!). But how truly widespread is it among the Lisp dialects to be able to connect to a running program, debug, and hotfix it? I understand Common…
Python is not Lisp, but jumping into a Python REPL in a halfway-run program and poking at the internals easily is _very_ useful as a debugging tool, quickly getting you answers on some messier programs. It's a shame that other scripting languages that theoretically have the capabilities to do this don't do this (looking at you, node! Chrome dev tools are fine but way too futzy compared to `import pdb; pdb.set_trace()…
Re: Why I still reach for Lisp and Scheme instead of Haskell
#70This hits home for me. Print statements are essential to the way I code. I use them to debug, to examine variables and parameters, to trace execution flow. I rarely use debuggers.