[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Declaring variables more than once
In article <17416@shemp.CS.UCLA.EDU> firstname.lastname@example.org (Brad Pierce) writes:
>Also, is one allowed to declare the same identifier more than once in the same
>lambda closure in official Scheme?...((lambda (x x) x) 1 2)
There's no prohibition in R3RS, but that's an oversight. R4RS will say that
(lambda (x x) ...) is an error. Implementations will still not be required
to detect the error.
>And is it officially legal to "define" something more than once at top level.
There is nothing that says you can't. Many people think that a <program>
should not contain multiple top level definitions for the same variable,
but that an interactive programming environment must allow re-definitions
as a debugging feature. This is my view.
Peace, William Clinger