[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hash-table-{to, from}-alist
From: |
Stephen J. Turnbull |
Subject: |
Re: hash-table-{to, from}-alist |
Date: |
Tue, 25 Nov 2008 10:50:53 +0900 |
Ted Zlatanov writes:
> The equality test is necessary if it was given originally (meaning,
> if it's not 'eql). I don't think we should ever omit it, even if
> it's the default value, for readability.
I disagree. But it's not incompatible as long as you don't make the
:test option to make-hash-table obligatory. ;-)
> Would this work?
>
> #s(hash-table size 2 test equal data (k1 v1) (k2 v2))
Not quite. The data field in XEmacs is a plist, and the construct
above signals an error.
#s(hash-table size 2 test equal data (k1 v1 k2 v2))
> Finally, the size is just a hint with make-hash-table; should the (read)
> allow wrong sizes or throw an error?
XEmacs allows wrong sizes. I think this makes sense, but it probably
isn't deliberate (the structure-reading mechanism validates field
values one at a time; I don't see a provision for cross-field
consistency checks).
#s(hash-table size 10 data (y y-value x x-value))
#<hash-table size 2/29 data (y y-value x x-value) 0x587cb2e2>
- Re: hash-table-{to, from}-alist, (continued)
- Re: hash-table-{to, from}-alist, Stefan Monnier, 2008/11/21
- Re: hash-table-{to, from}-alist, Ted Zlatanov, 2008/11/21
- Re: hash-table-{to, from}-alist, Stefan Monnier, 2008/11/21
- Re: hash-table-{to, from}-alist, tomas, 2008/11/22
- Re: hash-table-{to, from}-alist, Stephen J. Turnbull, 2008/11/22
- Re: hash-table-{to, from}-alist, tomas, 2008/11/22
- Re: hash-table-{to, from}-alist, Stephen J. Turnbull, 2008/11/22
- Re: hash-table-{to, from}-alist, Richard M Stallman, 2008/11/24
- Re: hash-table-{to, from}-alist, Stefan Monnier, 2008/11/24
- Re: hash-table-{to, from}-alist, Ted Zlatanov, 2008/11/24
- Re: hash-table-{to, from}-alist,
Stephen J. Turnbull <=
- Re: hash-table-{to, from}-alist, Ted Zlatanov, 2008/11/25
- Re: hash-table-{to, from}-alist, Ted Zlatanov, 2008/11/25
- Re: hash-table-{to, from}-alist, Stefan Monnier, 2008/11/25
- Re: hash-table-{to, from}-alist, David De La Harpe Golden, 2008/11/25
- Re: hash-table-{to, from}-alist, Stefan Monnier, 2008/11/25
- Re: hash-table-{to, from}-alist, David De La Harpe Golden, 2008/11/26
- Re: hash-table-{to, from}-alist, Stephen J. Turnbull, 2008/11/25
- Re: hash-table-{to, from}-alist, David De La Harpe Golden, 2008/11/25
- Re: hash-table-{to, from}-alist, Ted Zlatanov, 2008/11/26
- Re: hash-table-{to, from}-alist, Stefan Monnier, 2008/11/26