[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hash-table-{to, from}-alist
From: |
Stefan Monnier |
Subject: |
Re: hash-table-{to, from}-alist |
Date: |
Fri, 31 Jul 2009 15:03:48 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
SM> Of, course there's always another (more reliable) way:
SM> (hash-table-p (read-from-string (prin1-to-string (make-hash-table))))
> That was my first thought, but it seemed like a really hacky approach
> when featurep exists.
It's definitely not hacky. It's more reliable (tho it probably requires
a bit of fiddling such as wrapping it in ignore-errors) and tests more
directly the presence of the feature you need.
The advantage of the featurep call is that it's likely to be
more efficient (which only matters if the test is made within a loop,
of course).
Stefan
- Re: hash-table-{to, from}-alist, Ted Zlatanov, 2009/07/30
- Re: hash-table-{to, from}-alist, Chong Yidong, 2009/07/30
- Re: hash-table-{to, from}-alist, Ted Zlatanov, 2009/07/30
- Re: hash-table-{to, from}-alist, Chong Yidong, 2009/07/30
- Re: hash-table-{to, from}-alist, Stefan Monnier, 2009/07/30
- Re: hash-table-{to, from}-alist, Stefan Monnier, 2009/07/30
- Re: hash-table-{to, from}-alist, Ted Zlatanov, 2009/07/31
- Re: hash-table-{to, from}-alist,
Stefan Monnier <=
- Re: hash-table-{to, from}-alist, Ted Zlatanov, 2009/07/31
- Re: hash-table-{to, from}-alist, Stephen J. Turnbull, 2009/07/31
- Re: hash-table-{to, from}-alist, Ted Zlatanov, 2009/07/31