4 ms·
Probably paredit. It's really so much better than non-structured editing. That said, there are structured editing plugins/modes/editors for other languages too.
by pka 10y ago
Probably paredit. It's really so much better than non-structured editing. That said, there are structured editing plugins/modes/editors for other languages too.
However, looking back at Lisp/Clojure now I really don't like the syntax anymore. I don't care about the brackets, it's absolutely true that you learn to look past them in a matter of days, but the homogeneity and the "denselesness" really impact my ability to quickly parse an expression. Infix syntaxes make reading code much easier, imo.
- roboguy12 10y agoI thought that at first too about infixes being better (I've only been using Clojure for a few months), but I'm beginning to find the opposite. The only times when I miss an infix syntax is when doing math 1 + (2 * 10) - (12 / 3) is so much easier for me to read to read than (- (+ 1 (* 2 10) (/ 12 3))) But when working with functions, I much prefer the standard Clojure syntax.
- malloryerik 10y agoI believe the parens are off by one in the Clojure example and that it should be: (- (+ 1 (* 2 10)) (/ 12 3)) ;=> 17 I've found the threading operator can help in these cases. (-> (+ 1) (+ (* 2 10) (- (/ 12 3)))) Or, line breaks can clarify: (- (+ 1 (* 2 10)) (/ 12 3)) or at the risk of overdoing it: (- (+ 1 (* 2 10)) (/ 12 3)) Now I know at first glance that I'm subtracting the results of those two lines from each other. Indeed the last two might be almost as clear as the infix, and are without any order of operations rules. Also some don't like colored parens but I find them very clarifying.
- pka 10y agoI have to disagree. f x . g reads just so much easier than (comp (partial f x) g)