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

Re: Some easy ones (?)



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))
	a))

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
illegality".

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.