Why is it customary to put many closing parentheses on one line in Lisp-based languages?

后端 未结 8 1190
野的像风
野的像风 2021-02-05 01:19

Usually code looks like this:

(one-thing
    (another-thing arg1 (f arg5 r))
    (another-thing arg1 (f arg5 r)))

Why doesn\'t it like this?:

相关标签:
8条回答
  • 2021-02-05 01:58

    The parentheses aren't there for readability, they are there for the computer. The programmer can see where the block of code ends by looking at the indents. Furthermore, having multiple closing parentheses share a line means the programmer can view more code at once on the screen.

    0 讨论(0)
  • 2021-02-05 02:02

    Short answer: Deviating from recognized standards only serves to alienate potential contributors. No one style is optimally better than another.

    Long answer: http://blog.fogus.me/2010/08/30/community-standards/

    0 讨论(0)
提交回复
热议问题