[r6rs-discuss] [Formal] Add symbol=? and boolean=?
cowan at ccil.org
Fri Feb 9 16:24:02 EST 2007
Lauri Alanko scripsit:
> It is customary for all
> (non-singleton) types to have their own dedicated equivalence
> predicates. Symbols and booleans seem to be the only exceptions.
This turns out not to be the case.
Procedures, pairs, lists, and vectors in the base library do not have
(and never have had) standardized dedicated equivalence predicates.
In other standard libraries, there are no equivalence predicates for
records, conditions, ports, transcoders, or hash tables, and AFAIK no
SRFI has ever standardized any.
> Currently, symbol comparisons are often done with eq?, which seems like
> bad style, since eq? is a low-level optimization primitive with
> implementation-dependent semantics.
eqv?, however, is entirely appropriate for the job, and probably is
as efficient, since it would be very surprising if an implementation
of eqv? did not immediately call eq?.
We call nothing profound cowan at ccil.org
that is not wittily expressed. John Cowan
--Northrop Frye (improved)
More information about the r6rs-discuss