Email list hosting service & mailing list manager

Enum identity Marc Nieper-Wißkirchen (15 Sep 2020 19:06 UTC)
Re: Enum identity John Cowan (15 Sep 2020 20:28 UTC)
Re: Enum identity Marc Nieper-Wißkirchen (15 Sep 2020 20:34 UTC)
Re: Enum identity John Cowan (15 Sep 2020 21:53 UTC)
Re: Enum identity Wolfgang Corcoran-Mathe (18 Sep 2020 17:12 UTC)

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 <xxxxxx@ccil.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.