Subject: PROGN considered intrusive?
From: Erik Naggum <>
Date: 1999/03/21
Newsgroups: comp.lang.lisp
Message-ID: <>

  there have been strong arguments against IF (and WHEN and UNLESS) here
  and elsewhere, and they continue to baffle me.  today, it dawned on me
  that maybe what people actually don't like is PROGN.  (I have never been
  bothered by it any more than I'm bothered by the need to use braces
  around compound statements in C, which also seems to bother some people.)

  one suggested way to get rid of the PROGN is to create a new form IF*,
  which takes keywords THEN and ELSE that delimit the compound statements,
  and which supposedly allows more reasonable nesting, as well.

  however, if PROGN is intrusive in IF, and we're relieved of its presence
  in a lot of other forms which take implicit PROGNs, perhaps we should fix
  PROGN, not IF?  here's a suggestion:

(defun \{-reader (stream character)
  (declare (ignore character))
  (cons 'progn (read-delimited-list #\} stream t)))

(set-macro-character #\{ #'\{-reader)
(set-syntax-from-char #\} #\))

(set-pprint-dispatch '(cons (eql progn))
  (lambda (stream object)
    (pprint-logical-block (stream object :prefix "{" :suffix "}")
      (pprint-linear stream object nil))))

  so instead of the standard Common Lisp

(if (foo)

  we could have

(if (foo)

  as opposed to the more "alternative"

(if* (foo)
   then (then-1)
   else (else-1)

  I could easily get used to the {} forms (please don't use my C history
  against me, and don't you _dare_ use whitespace after { or before }),
  while I continue to have serious readability problems with the IF* form.
  the reason may be that the keywords are _far_ too prominent and intrusive
  compared to the forms in each branch, and much more than PROGN could ever
  hope to be.

  do people actually think PROGN is intrusive and a waste of space?  would
  using a short-hand like {} work as well to reduce "noise" as using '
  instead of a QUOTE form does?  and does this make more sense than IF*?