[plt-scheme] Paren Paralysis Sufferers Unite

From: David Storrs (david.storrs at gmail.com)
Date: Fri Oct 16 16:04:17 EDT 2009

On Fri, Oct 16, 2009 at 3:55 PM, Carl Eastlund <carl.eastlund at gmail.com> wrote:

> That, and use a Scheme-conscious editor like DrScheme (or Emacs or vi,
> if you're familiar).

Carl beat me to it on this one.

Two more tricks you can do to simplify your life:

1) Always write parens in pairs, then fill in what goes inside them.

2) Add newlines to make it clearer what goes with what.  This isn't
the "done thing" in Scheme, but it's a useful tool while you're
learning.  So:

(define (foo a b (c 7))
  (let (
          (x a)
        )
    (begin
      (display a b c)
     )
)) ; let and define

A decent editor will handle the alignment for you.

--Dks


Posted on the users mailing list.