Re: Enum identity Marc Nieper-WiÃkirchen 15 Sep 2020 20:34 UTC
Thanks for considering this request. Am Di., 15. Sept. 2020 um 22:28 Uhr schrieb John Cowan <firstname.lastname@example.org>: > > I'm defining enum identity as eqv? rather than eq?, because eqv? is Scheme's identity predicate. Here's the new definition of enum=?: As it doesn't cost anything to define the identity as `eq?`, please do this. Hash tables with eq? instead of eqv? are usually simpler (and faster) because they can simply use the object's address as the hash function (and do not have to do type checks first). Scheme has eq? exactly for these purposes, so we shouldn't ignore it.