3 ms·
(())()()(()) Parentheses in FP makes me dizzy, is there an IDE based solution to that ? FP almost feels like speaking a very long statement while running out of
by 31reasons 14y ago
(())()()(()) Parentheses in FP makes me dizzy, is there an IDE based solution to that ? FP almost feels like speaking a very long statement while running out of breath!
- tsm 14y agoParens are a Lisp thing, not an FP thing. Languages like SML and Haskell (especially point-free Haskell) are very light on them.
- tikhonj 14y agoThere is an IDE-based solution! It's called Paredit and can be combined with something like SLIME. (All this for Emacs, of course, but Emacs has all the capabilities of an IDE, especially for Lisp.) After a while of using paredit, I actually grew to rather like the parentheses. At the very least, it lets me edit in a slightly more semantic fashion: I can navigate, select and modify code based on its structure because the structure is defined by the parentheses. That said, I actually do prefer not having nearly as many parentheses, which is why I like ML-style syntaxes. Especially Haskell. Idiomatic Haskell is very light on parentheses and braces and brackets--it's a surprisingly minimalistic syntax. I love it.
- zaptheimpaler 14y agoI used rainbow parentheses for vim (https://github.com/kien/rainbow_parentheses.vim https://github.com/kien/rainbow_parentheses.vim) when working with Clojure, I don't know about IDEs. Also, only LISPs are parens heavy. Try something like SML or Scala if that turns you off. Side note: I'm writing some Java code to practice for interviews.. I miss sum types so much. Another thing that FP got right.