[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Some easy ones (?)
- To: FAHLMAN@C.CS.CMU.EDU
- Subject: Re: Some easy ones (?)
- From: masinter.PA@Xerox.COM
- Date: Sat, 26 Jul 1986 22:22:00 -0000
- Cc: Andy Freeman <ANDY@SUSHI.STANFORD.EDU>, common-lisp@SU-AI.ARPA
- In-reply-to: FAHLMAN@C.CS.CMU.EDU's message of Sat, 26 Jul 86 15:55 EDT, <FAHLMAN.12225827449.BABYL@C.CS.CMU.EDU>
if you want simplicity, allowing duplicate names and just saying that
the last one shadows all the rest, both for references & for
declarations, would be the simplest rule.
(defun foo (a a )
(declare (special a))
then the second a would get the special binding.
(defun foo () (let((a 1)(a 2))
would return 2, etc.
Its a very simple rule. Its probably an easier rule to understand than
"its illegal, but lots of interpreters & compilers don't check for
Its not hard to implement in the interpreter or the compiler, you just
have to be careful about what order you do things in.
There's lots of things you can do in Common Lisp that are bad style.
There's no reason to omit language features just because they're bad
programming style... the compiler isn't a style-checker.