Hacker News new | ask | show | jobs
by Syzygies 1387 days ago
This is a divisive question, because of survivorship bias. Remember when the WWII Brits wanted to reinforce planes where they saw bullet holes coming back, till a statistician asked why no planes came back with holes in the other spots?

People who use lisp like the parentheses.

I don't, though they're no more objectionable than all the {}; languages. I just don't like unnecessary punctuation.

I coded in scheme for years using a preprocessor that understood

    define-syntax opt
      syntax-rules |
        $ _ (x v) b ...
          let || x | if (null? x) v | car x
            b ...
which is line for line equivalent to

    (define-syntax opt
      (syntax-rules ()
        ((_ (x v) b ...)
          (let ((x (if (null? x) v (car x))))
            b ...) )))
It's a matter of taste, but I'd rather read the former. The key ideas, other than using indentation to carry parenthesis level, are to use $ to hang double indents, and | to open a parenthesis that auto-closes.

I gave this up learning Clojure so I could use other people's tools. Instead I prefer lighter parentheses, and I use this script to tailor fonts for coding lisp:

https://gist.github.com/Syzygies/226253bc38743ef474ee67cbf58...

I have the most trouble with comment characters, in any language. In various languages I used a preprocessor that implemented a practical version of "comments are flush, code is indented" (hey, it cost me one level) and relied on syntax coloring to mute the comments. Again, I gave this up to use other people's tools.