[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: hes @ SCRC-VIXEN
- Subject: Historical Footnote
- From: Kent M. Pitman <KMP @ MIT-MC>
- Date: Wed, 13 Jul 1983 02:44:00 -0000
- Cc: Common-Lisp @ SU-AI
Date: Tuesday, 12 July 1983, 17:42-EDT
From: Howard Shrobe <hes%VIXEN%MIT-MC@SU-DSN>
Re: function specs
(defmacro deffunny (name (symbol indicator) &body body)
(let ((standin (gensym)))
(defun ,standin ,args ,@body)
(putprop ',symbol (fsymeval ',standin) ',indicator))))
which is vintage 1973 MacLisp whose demise was welcomed by all
when the extended defun was introduced...
Well, allowing for the obvious bugs in this definition
(ARGS isn't bound anywhere, NAME isn't used, etc.), the 1973 syntax
would have been...
(defun deffunny macro (form)
(prog (temp symbol indicator body standin)
(setq temp (car (setq form (cdr form))))
(setq args (car (setq form (cdr form))))
(setq body (cdr form))
(setq symbol (car temp))
(setq indicator (cadr temp))
(setq standin (gensym))
(return (list 'progn ''compile
(cons 'defun (cons standin (cons args body)))
(list 'defprop symbol standin indicator)))))
Of course, this STILL would not have worked reliably since if I'm not mistaken
gensyms lose their uniqueness when output by the compiler, so you'd have
interned symbols that looked like G0017 all over the place and if you loaded
the results of separate compilations which had had the same gensym counter,
you'd be clobbering functions back and forth accidentally. So this is, even
today, not a reliable strategy.
No heavy-duty point to be made here. Just wanted to remind you what "common"
lisp looked like in 1973. We have come a longer way than you might remember.
Still, as is obvious from the holes in the language, we have a long ways to
go. The belief seems to be that premature standardization would be far worse
than living with certain parts of the language fuzzily defined while we think