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 398: Allow repeated keys in `case`

2012-08-27 07:16:26
WG1 - Core
alexshinn
major
cowan
wontfix
source
closed
2012-06-10 08:49:29
defect

R5RS says it's an error for a key to appear in more than one clause of case (or twice in the same clause, but that's trivial). R6RS allows the same key to appear more than one clause, but insists on left-to-right testing throughout, like cond. The R6RS editors thought this was better for machine-generated code, though worse for hand-written code.

I suggest a compromise: allow keys to appear in more than one clause, but behave as if the key appeared only in the first (leftmost) clause. This allows hash-table or other non-left-to-right implementations.

If machine-generated code is the only justification for this change, then let's not make it. It's so easy to eliminate repeated keys even in machine-generated code that there's no excuse for not doing so.

statusnewdecided

WG1 decided to keep the R5RS rules: no duplicate keys.

resolutionwontfix
statusdecidedclosed