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)
Received on Fri Feb 09 2007 - 16:24:02 UTC