Message from discussion the "loop" macro
From: Gareth.McCaug...@pobox.com (Gareth McCaughan)
Subject: Re: the "loop" macro
References: <3B88815A.B5D98835@rcn.com> <MPG.firstname.lastname@example.org> <email@example.com> <MPG.firstname.lastname@example.org> <email@example.com> <MPG.firstname.lastname@example.org>
Organization: International Pedant Conspiracy
User-Agent: slrn/0.9.6.3 (FreeBSD)
Date: Sun, 26 Aug 2001 22:25:22 +0100
X-Trace: monolith.news.easynet.net 998862654 18.104.22.168 (Sun, 26 Aug 2001 22:50:54 BST)
NNTP-Posting-Date: Sun, 26 Aug 2001 22:50:54 BST
John Foderaro wrote:
> One of the problems I have with the if special form occurs at the of the
> bar function. It's pretty easy to get confused and think that the dotimes
> at the end is always executed. At first glance you may not see the
> indentation difference between the if and dotimes.
where the BAR function looks, in outline, like this.
(defun bar ()
It seems to me that the blame here lies not with IF, but
with the peculiar convention, which I have never understood,
that indents the "then" and "else" parts of an IF differently.
It would almost make sense if the "else" part of an IF had an
implicit PROGN, but it doesn't.
With indentation more like
(defun bar ()
it is much harder to miss the fact that the two consequent
clauses are indented by the same amount.
Perhaps someone can enlighten me. Why is IF so often indented
in this strange way? (Non-answer: "Because that's what emacs
lisp-mode does." So, why does emacs lisp-mode do it?)
In the particular case John Foderaro posted, the stuff-to-do-when-true
is moderately long (17 lines). If that's too long to be able to see
how the indentation lines up, well, that's a pity, but that sort of
issue arises absolutely all the time and there ought to be better
solutions than changing the syntax. Do we need a new syntax to
replace LET, with explicit end-of-scope markers? A new syntax for
function call, so you can't get confused about what function any
given thing is an argument to? That way lie XML and madness...
Gareth McCaughan Gareth.McCaug...@pobox.com
.sig under construc