News for hackers. Stuff that matters.
Re:Pretty Lisp by dfan on Wednesday February 29, 2012 @04:44PM (#3649849)
It is odd that in the third screenshot there is no visual differentiation between the true and false blocks of an if statement. That's one place where I still kind of regret the genericness of Lisp syntax.

Perhaps place a green outline around the true block, a red outline around the false block (if any), and indent them both slightly or otherwise connect them to the predicate block so that the connections are clear.

Of course one issue with treating constructs like if specially is that in Lisp you can create your own macros that act just like if but then don't get the special visual treatment.

Re:Pretty Lisp by jrockway on Wednesday February 29, 2012 @05:14PM (#3649972)
Emacs indents the true and false forms differently:

    (if (foo-condition-p)
        bar  ;; then
      baz    ;; else
      quux)  ;; else
You can also declare the indentation style of arbitrary macros, ensuring that "if" is not just some special case.
Re:Pretty Lisp by simonb on Thursday March 01, 2012 @09:10AM (#3652095)
This is an emacs lisp-only convention, most likely stemming from the fact that elisp allows multiple else forms (most other lisps don't, which at least for me also solves the problem of visually parsing ifs).
Re:Pretty Lisp by dfan on Wednesday February 29, 2012 @04:46PM (#3649863)
(Following on from the last paragraph) I guess the thing to do is to have a little DSL declaring how to prettyize any sort of block (which I assume already exists for this project to work at all), and then allow the user to customize it to add his/her own.