emacs-devel
[Top][All Lists]
Advanced

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

Re: hash-table-{to, from}-alist


From: Ted Zlatanov
Subject: Re: hash-table-{to, from}-alist
Date: Fri, 31 Jul 2009 15:25:07 -0500
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux)

On Fri, 31 Jul 2009 15:03:48 -0400 Stefan Monnier <address@hidden> wrote: 

SM> Of, course there's always another (more reliable) way:
SM> (hash-table-p (read-from-string (prin1-to-string (make-hash-table))))
...
SM> It's definitely not hacky.  It's more reliable (tho it probably requires
SM> a bit of fiddling such as wrapping it in ignore-errors) and tests more
SM> directly the presence of the feature you need.

SM> The advantage of the featurep call is that it's likely to be
SM> more efficient (which only matters if the test is made within a loop,
SM> of course).

If it's all right, can I stick to provide/featurep?  It simplifies the
client code, plus there are some performance improvements as you noted.

Ted





reply via email to

[Prev in Thread] Current Thread [Next in Thread]