emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs lisp syntax rfc: (cond (EXPR => (lambda (X) ...)))


From: Harald Hanche-Olsen
Subject: Re: emacs lisp syntax rfc: (cond (EXPR => (lambda (X) ...)))
Date: Wed, 05 Jan 2011 23:40:46 +0100 (CET)

[Stefan Monnier <address@hidden> (2011-01-05 21:29:30 UTC)]

> Yet, Richard's proposal solves another problem as well:
> often the value is needed not just for the body of a cond branch, but
> also for subsequent branches

When I read this, I thought for a moment that you had lost your
marbles: For you only get into subsequent branches if the previous
conditions were all nil, which is a rather boring value to retain for
later use. But then I realized that you are now talking about a way to
bind subexpressions of a condition to make it available further in,
and that makes sense. Sort of.

However, it seems to me that we are now coming up with rather
convoluted schemes in which scoping become far from obvious,
especially to someone unfamiliar with this particular lisp. Also, I
wonder what is so special about cond, anyhow? Surely, you may wish to
make subexpressions of the condition in an if, when or unless form
available to other parts of the form as well? But we already have that:
Any lisp programmer will surely understand the role of blah in

(let (blah)
  (if (foo (setq blah (quux)))
      (bar blah)
    (baz blah)))

and it seems to me that dressing this construct up in a bunch of extra
syntax is just going to muddy the waters and confuse the users.

And by the way, the bike shed should be blue for certain.

- Harald



reply via email to

[Prev in Thread] Current Thread [Next in Thread]