[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue: IGNORE-VARIABLE (Version 1)
- To: Kent M Pitman <franz!akbar!franz!ucbarpa!STONY-BROOK.SCRC.Symbolics.COM!KMP>
- Subject: Re: Issue: IGNORE-VARIABLE (Version 1)
- From: franz!frisky!jkf@ucbarpa.Berkeley.EDU (John Foderaro)
- Date: Wed, 08 Feb 89 11:54:34 PST
- Cc: franz!SAIL.Stanford.EDU!CL-Cleanup
- In-reply-to: Your message of Wed, 08 Feb 89 14:04:00 EST. <890208140425.7.KMP@BOBOLINK.SCRC.Symbolics.COM>
>> One good metric of whether it is a good programming practice is whether
>> it ever leads to trouble. Do you ...
>>
>> - have any instances of real code that uses IGNORE where you felt
>> the writer's intent would have been clearer if he'd done something else?
I'm sure that if you gave me access to source code where 'ignore' was
used, I could find plenty of examples where it shouldn't have been.
Since I don't have that access, I looked in the pcl code (not to pick
on pcl, but it was all that I had):
from 3600-low.cl:
(defun set-function-name-1 (fn new-name ignore)
(cond ((or (funcallable-instance-p fn)
(si:lexical-closure-p fn))
So set-function-name-1 takes three arguments, what is the third
argument? Suppose I want to rewrite set-function-name-1, maybe I'll
need this variable when I rewrite it.
Here is how it should be written (sure it takes more keystrokes
but it is worth it):
from coral-low.cl:
(defun set-function-name-1 (function new-name uninterned-name)
(declare (ignore uninterned-name))
(cond ((ccl::lfunp function)
from macros.cl:
(defmacro destructuring-bind (pattern form &body body)
(multiple-value-bind (ignore declares body)
(extract-declarations body)
again, the question the reader of this code has is what the first
value returned by extract-declarations?