A proposed new approach to bounds vs. salt John Cowan (26 Dec 2015 02:12 UTC)
Re: A proposed new approach to bounds vs. salt taylanbayirli@xxxxxx (26 Dec 2015 14:00 UTC)
Re: A proposed new approach to bounds vs. salt Alex Shinn (30 Dec 2015 05:37 UTC)
Re: A proposed new approach to bounds vs. salt John Cowan (03 Jan 2016 22:26 UTC)
Re: A proposed new approach to bounds vs. salt Shiro Kawai (04 Jan 2016 02:08 UTC)
Re: A proposed new approach to bounds vs. salt Alex Shinn (07 Jan 2016 04:26 UTC)
Re: A proposed new approach to bounds vs. salt Kevin Wortman (15 Jan 2016 00:45 UTC)

Re: A proposed new approach to bounds vs. salt John Cowan 03 Jan 2016 22:26 UTC

Alex Shinn scripsit:

> Performance matters, so make this syntax.

I think it's fine for it to be part of trivial compile-time folding.

> A likely idiom
> for performance conscious 3rd-party hash functions might
> become:
>
>   (define my-hash
>     (if (fixnum? (hash-default-bound))
>         (lambda (obj) ... hash w/ fixnum arith ...)
>         (lambda (obj) ... hash w/ general arith ...)))

Yes, that's plausible.

> Regarding using the sign of an optional bound argument as
> a semantic toggle, I agree with Taylan.  We should be removing
> warts, not adding new ones.  Not even in the core language did
> we do anything so strange in the name of backwards compatibility.

True.

> Why the sudden obsession with compatibility at the expense of
> clean design just for hash tables?

R7RS-small was all about compatibility.  I'm trying to keep the
number of backward incompatible changes for R7RS-large as
small as possible too.

Hash tables are a can of worms, but they have to be opened and
served up somehow.

--
John Cowan          http://www.ccil.org/~cowan        xxxxxx@ccil.org
I must confess that I have very little notion of what [s. 4 of the British
Trade Marks Act, 1938] is intended to convey, and particularly the sentence
of 253 words, as I make them, which constitutes sub-section 1.  I doubt if
the entire statute book could be successfully searched for a sentence of
equal length which is of more fuliginous obscurity. --MacKinnon LJ, 1940