Dmitry Kakurin wrote: >> Stylistic: you should not put the closing parens on dedicated lines. >> They are normally collected on the last line. While this is only a >> style issue, you should get used to it, since 99.9% of all code at in >> the wild will use that style... > > I've read it many times, and I've tried to do it. > But how do you solve this practical problem: > When you need to insert something in the middle, how do you find the > right closing paren > where to split it? I use TextMate if it matters.
Most people writing in a lisp use an editor that does paren highlighting. So for example in Emacs, when I have something like this: (foo (bar (baz (quox '(a b c))))) It's hard to show this in an email but if I move the cursors (_) to the right of one of closing parens, then emacs will highlight the one it matches with, by changing the background colour: (foo (bar *(*baz (quox '(a b c)))_)) Some people also use something called "rainbow parens" which is where each pair of matching parens are colour coded. Others use s-expression highlighting, which colour codes the whole expression. You can see various versions of this here: http://lemonodor.com/archives/001207.html It's worth trying out an editor with Clojure support (Emacs with SLIME, Vim with VimClojure, Enclojure, the IDEA plugin etc), they have useful shortcuts like hotkeys for moving between s-expressions and you can quickly evaluate things from in your editor without having to switch to the REPL. For example if I write (apply + [1 2 3 4]) in a file in Emacs and hit Ctrl-X Ctrl-E then "10" appears in the status line. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---