3 ms·
In my code, where the binding forms would typically be longer than (a 1) or (b 2), they each go on their own line, and the editor will align them by their left
by thinkingeric 16y ago
In my code, where the binding forms would typically be longer than (a 1) or (b 2), they each go on their own line, and the editor will align them by their left parentheses. In those cases where the initialization form needs to be broken into another line, the editor will indent the continuation properly, and the 'terminating' parenthesis is actually a helpful visual cue that the form is done.
I haven't written any Clojure so I'm not sure how my brain would react to non-delimited forms (ie, the implicit pairs). I also don't know how Emacs handles the indentation for these, or whether in more complicated cases, my brain would have to work harder to group the binding forms. I read the Clojure specs on 'let' and it appears to be a somewhat different beast than the CL 'let'. In more complicated cases, it doesn't appear to be an apples-to-apples comparison in terms of parsing the 'shape' of the expressions.
- evanrmurphy 16y ago> I'm not sure how my brain would react to non-delimited forms (ie, the implicit pairs). You probably wouldn't like it. ;) Seriously though, I think what we're used to plays a tremendous role in our preference here. > I also don't know how Emacs handles the indentation for these For Arc, anyway, the indentation algorithm is constantly making mistakes. I always hesitate to auto-indent a region because I know I'll have to go through and manually fix things. But I'm not sure this is the language's fault - the Emacs mode probably just needs to be smarter.