[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bawden's Alternate Proposal
- To: common-lisp@SU-AI.ARPA
- Subject: Bawden's Alternate Proposal
- From: Alan Bawden <ALAN@AI.AI.MIT.EDU>
- Date: Mon, 21 Jul 86 17:55:05 EDT
- In-reply-to: Msg of 21 Jul 86 16:34:00 EST from "BACH::GREEK" <greek%bach.decnet@hudson.dec.com>
From: "BACH::GREEK" <greek%bach.decnet@hudson.dec.com>
Bawden's proposal would result in the following.
(FLET ((FOO (X) (FOO X X)))
(DECLARE (FUNCTION FOO (INTEGER) INTEGER))
... (FOO 5) ...)
The declaration for FOO would pertain to both the locally-defined
FOO and the outer FOO used in its body.
This is correct. Since function names are lexically scoped, you can call
the inner function something other than FOO with only a minor change to
your program. Is this situation actually common in anyone's code?