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

Re: Issue: DESTRUCTURING-BIND (Version 2)



    Date: Mon, 06 Feb 89 13:27:54 PST
    From: franz!frisky!jkf@ucbarpa.Berkeley.EDU (John Foderaro)

    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
	not referenced.  

    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?

I understand your point, but I don't see it that way.  To me, asking for
a way to create user-defined synonyms for IGNORE is like asking for a
way to create user-defined synonyms for &REST.  It would be more general
and flexible, but it doesn't seem necessary nor very useful.

	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
	declaration.

    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.   

No it's not.

			 You are asking for 'ignore-if-unused' not 'ignore'
    (most compilers (I assume) will complain if a variable declared ignored is
    actually used).

No, I was asking for the equivalent of the IGNORE declaration.  Unfortunately
I expressed myself poorly, so I can see how you thought I was asking for
something different.  I'm sorry about that.

	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.

Conciseness saves reading time also.