On Sat, Jan 20, 2007 at 07:40:16PM -0500, John Cowan wrote:
>
> Currently, the behavior of eqv? and eq? on records, conditions,
> ports, syntax objects, hash tables, and promises is not defined.
> They should be treated the same as pairs, vectors, and strings.
The current draft does not require that promises be disjoint from
the other data types, as far as I can see; that is, while it sort of
vaguely hints at such, it does not seem to me to actually forbid an
implementation from extending force to be the identity on non-promises
(thus defining "a promise" for the purpose of R6 as any value) and
replacing delay forms with their arguments when that can be proven safe
(as an optimization). Or, put another way, this:
(let ((p1 (delay 23))
(p2 (delay (- (* 3 3 3) 2 2))))
(eq? p1 p2))
could return #t. This point could perhaps do with some clarification
in the standard, either to explicitly permit such extensions (as was
done before) or explicitly forbid them; I could comment formally to this
effect if desired.
For the other types, I can't see why they shouldn't be treated normally;
conditions, ports, hash tables, and record types all have membership
predicates, and "[w]rapped syntax objects are distinct from the other
types of values" (though no syntax? procedure is defined), for one.
--
(let ((C call-with-current-continuation)) (apply (lambda (x y) (x y)) (map
((lambda (r) ((C C) (lambda (s) (r (lambda l (apply (s s) l)))))) (lambda
(f) (lambda (l) (if (null? l) C (lambda (k) (display (car l)) ((f (cdr l))
(C k))))))) '((#\J #\d #\D #\v #\s) (#\e #\space #\a #\i #\newline)))))
Received on Mon Jan 22 2007 - 13:00:05 UTC