Mark H Weaver <m...@netris.org> writes: > Hi David, > > David Kastrup <d...@gnu.org> writes: > >> Mark H Weaver <m...@netris.org> writes: >> >>> 'eqv?' is Scheme's fundamental "operational equivalence" predicate. >>> 'eq?' is just an ugly efficiency hack, a poor cousin of 'eqv?' that >>> fails in surprising ways. No _correct_ program is ever broken by making >>> 'eq?' an alias to 'eqv?'. Many programs contain subtle bugs because of >>> their inappropriate use of 'eq?'. >>> >>> What's the argument on the other side? Is there a compelling reason to >>> use 'eq?' instead of 'eqv?' for object properties? >> >> object identity is checked by eq? and is conceptually different from >> value equality. > > The Scheme standards don't support your view. The _only_ difference > between 'eq?' and 'eqv?' is that 'eqv?' is well-defined on numbers and > characters, whereas 'eq?' is unspecified for those types.
And why would that be if numbers were proper objects? The difference is _exactly_ there because they aren't. > Numbers and characters do not have any notion of "object identity", > apart from operational equivalence. Which is why it does not make a lot of sense to assign "object properties" to them. -- David Kastrup