This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Ticket 115: Rebinding variables shouldn't affect the behavior of standard procedures

2011-05-19 14:19:10
WG1 - Core
alexshinn
major
cowan
worksforme
source
closed
2010-12-23 10:05:25
defect

(let ((cdr #f)) (length '(a b c))) and (define cdr #f) (length '(a b c))) should not throw exceptions, because binding or mutating the variable cdr should not affect the behavior of length.

Most Schemes already behave like this (Scheme 9 is an exception), and R6RS requires it.

resolutionworksforme
statusnewclosed

In the chapter "Standard Procedures:"

A program may use a top-level definition to bind any variable. It may subsequently alter any such binding by an assignment (see Assignments). These operations do not modify the behavior of Scheme's built-in procedures. Altering any top-level binding that has not been introduced by a definition has an unspecified effect on the behavior of the built-in procedures.

this was introduced in IEEE Scheme, and therefore cannot be removed without an argument that it is fundamentally broken. I've seen no one argue against this, so will close the ticket.