[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*To*: Panu Kalliokoski <atehwa@xxxxxxxx>*Subject*: Re: hash for eq?*From*: Per Bothner <per@xxxxxxxxxxx>*Date*: Tue, 09 Aug 2005 23:26:06 -0700*Cc*: srfi-69@xxxxxxxxxxxxxxxxx*Delivered-to*: srfi-69@xxxxxxxxxxxxxxxxx*In-reply-to*: <20050810061835.GC2064@humma>*References*: <42F85877.7010801@xxxxxxxxxxx> <20050810061835.GC2064@humma>*User-agent*: Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720)

Panu Kalliokoski wrote:

On Tue, Aug 09, 2005 at 12:17:11AM -0700, Per Bothner wrote:Should the reference implementation of make-hash-table be modified so the default hash function for eq? is hash-by-identity? I.e. add in the obvious place:In the reference implementation, this does not help any, because it has (define hash-by-identity hash). If hash-by-identity were provided as a primitive, then yes, it would make sense. So it's just a question of whether we can trust Scheme implementors that use the SRFI code _partially_ to notice this particular thing.

I think it would clarify the intent better, both for users (it's useful to look at the reference implementation to see an alternative and more formal "specification"), and for implementors (often implementors take a reference implementations and tweak places that the reference implementation *recommends* shoudld be tweaked). If you make the change I suggested, it means a port has to modify less code (and the diffs are better localized), and it also make it clear that an implementation *should* use hash-by-identity (if provided) as the default hash function for eq?. -- --Per Bothner per@xxxxxxxxxxx http://per.bothner.com/

**References**:**hash for eq?***From:*Per Bothner

**Re: hash for eq?***From:*Panu Kalliokoski

- Prev by Date:
**Re: hash for eq?** - Next by Date:
**Re: should hash function upper bound be exclusive?** - Previous by thread:
**Re: hash for eq?** - Next by thread:
**should hash function upper bound be exclusive?** - Index(es):