[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue: DESTRUCTURING-BIND (Version 2)
- To: David A. Moon <franz!akbar!franz!ucbarpa!STONY-BROOK.SCRC.Symbolics.COM!Moon>
- Subject: Re: Issue: DESTRUCTURING-BIND (Version 2)
- From: franz!frisky!jkf@ucbarpa.Berkeley.EDU (John Foderaro)
- Date: Mon, 06 Feb 89 13:27:54 PST
- Cc: franz!SAIL.STANFORD.EDU!CL-Cleanup
- In-reply-to: Your message of Mon, 06 Feb 89 15:11:00 EST. <19890206201122.6.MOON@EUPHRATES.SCRC.Symbolics.COM>
What I suggested and what you want are in fact not separate issues.
What you said you want is:
the feature that I really prefer is the one that provides an
automatic DECLARE IGNORE for any variable that is named IGNORE and is
In other words, what you want is a new type of declaration that a variable
should be '(declare (ignore ..))'d if it isn't used. This is reasonable
thing to ask for. You further want to restrict that to the single
symbol named 'ignore'. What is the point in adding something
if you then go and restrict it to one symbol? Where is the leverage?
If one must write a declaration, I see no advantage to the user in
having to use a longer declaration name than the existing IGNORE
The point is that what you are asking for is different than just
automatically putting in a (declare (ignore ignore)) after every
binding of ignore. You are asking for 'ignore-if-unused' not 'ignore'
(most compilers (I assume) will complain if a variable declared ignored is
In most systems it works
to write (PROGN var1 var2 var3 body...) in the macro expansion to
make var1, var2, var3 look like they are used, so no new declaration
is required for this.
Maybe it is just me but I consider this practice to be vile. I certainly
hope that it is legitimate for a compiler to complain if the only use
of a variable is in a place where its value isn't used.
I would consider the adoption of this 'auto-ignore' proposal as
a little wart on the language that encourages bad programming style
(i.e. rather than use a meaningful variable name and then declare
it ignored, one would be encourage to be lazy and just use 'ignore').
As we are all aware, many more man-hours are spent reading
and modifying a piece of code than are spent typing it in, so
extra time spent while typing it in really counts.