GNU bug report logs -
#41354
equal? has no sensible code path for symbols
Previous Next
Full log
View this message in rfc822 format
In Scheme, symbols can be compared using eq? for equality. However,
since they have garbage-collected content attached, they do not meet the
predicate SCM_IMP in the short-circuit evaluation at the start of equal?
This means that unequal symbols compared using equal? fall through a
whole bunch of tests and end up in a general structural comparison
comparing their underlying string names.
This completely sabotages the semantics symbols are intended for.
Behavior for eqv? is similar but the fall-through at least is not as
expensive as it is for equal? .
--
David Kastrup
This bug report was last modified 4 years and 146 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.