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

Re: Issue: DESTRUCTURING-BIND (Version 2)

    Date: Mon, 06 Feb 89 10:29:41 PST
    From: franz!frisky!jkf@ucbarpa.Berkeley.EDU (John Foderaro)

	   From: David A. Moon <Moon@stony-brook.scrc.symbolics.com>
	   In fact 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.  

    You are kidding ... right?  

I am not.

    If you aren't then I'd like to tack on an amendment that 
    symbols beginning with the letters 'i' through 'n' are declared
    integer and all other symbols are declared float.

That feature of Fortran is in fact a fine feature, in its place,
that has done a lot of good for a lot of people.  I suppose I would
knock it if I were you, but I would not knock it if I were me.

    Seriously, I think that what you want is the  'ignore-if-unused'
    declaration we added which permits the variable to be used, but if it
    isn't there are no complaints.  It is very useful in macros.

That's an entirely different issue.  The whole point of treating the
variable IGNORE specially is to avoid having to write a declaration.
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

Your proposal is something different, to disable the complaint about
unused variables without causing a complaint if the variable is used.
That is indeed something people often do.  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.  I don't know right now whether Common Lisp
requires this to work in all implementations, or whether the unused
variable warning is permitted to be issued whenever the compiler can
deduce that the value of the variable does not affect the result and
side effects of the computation.