[R6RS] cyclic list exceptions
Michael Sperber
sperber at informatik.uni-tuebingen.de
Wed May 10 15:38:57 EDT 2006
dyb at cs.indiana.edu writes:
> On the subject of requiring map, reverse, append, etc., to check for
> cyclic lists, Mike claims that the programmer usually gets feedback in the
> form of nontermination when one of these procedures is passed a cyclic
> list. I initially bought claim, thinking only of an implementation that
> doesn't check for cycles, but what if an implementation does check for
> cycles but chooses do do something other than raise an exception?
> [...]
You're correct---I was implicitly assuming that (similarly to what we
do with infinities and NaN) we would restrict an implementation to
raising an exception if it detects the cycle, but I see this might be
awkward to specify.
> Bottom line: I think we should require these procedures to raise an
> exception when they receive a cyclic list. If an implementor wants to
> do something more cool, they can do so with versions exported from
> an implementation-specific library.
I assume you're also advocating that these procedures conceptually
operate on a copy of the input list, in the way you described Chez
Scheme's implementations?
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
More information about the R6RS
mailing list