Hacker News new | past | comments | ask | show | jobs | submit login

If you're looking at parentheses instead of using indentation effectively and looking at the first thing in the list you haven't learned how to read Lisp code yet. People look at Lisp and think that because of the parentheses they don't have to bother thinking about the typographic layout of the code like they do in C, so their code ends up with shitty formatting and they think it's because of the parentheses, when in reality it is because they didn't bother formatting it.

Getting rid of parentheses means you cannot use structured editing tools like Paredit anymore (http://emacswiki.org/emacs/ParEdit). You can't appreciate how slow and clumsy it is to edit code in other languages until you've been using Paredit for a while.

One sometimes valid argument against prefix notation is for expressions primarily involving binary math operations (+ * - / etc.). In some cases it's true, in other cases the Lisp code looks gnarly because people try to write the formula out without introducing intermediate variables. There's macros out there that will parse infix arithmetic (http://cliki.net/Infix); I've never used them so I can't comment on whether they improve code readability or not.




I don't see how the lack of (IMO) optional parens would prevent tools from working - they'd just have to be adjusted. Assuming this example from the ParEdit page is well-formed lisp:

    (defun paredit-barf-all-the-way-forward ()
        (interactive)
        (paredit-split-sexp)
        (paredit-forward-down)
        (paredit-splice-sexp)
        (if (eolp) (delete-horizontal-space)))
It doesn't seem that hard to rework a tool to use sig whitespace as indicating parens to have it operate the same over this code:

    defun paredit-barf-all-the-way-forward ()
        interactive
        paredit-split-sexp
        paredit-forward-down
        paredit-splice-sexp
        if (eolp) (delete-horizontal-space)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: