From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: hash-table-{to, from}-alist Date: Fri, 31 Jul 2009 15:25:07 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87ocr038ik.fsf@lifelogs.com> References: <863aknitfg.fsf@lifelogs.com> <87bpw4k1z6.fsf@xemacs.org> <86bpw3d829.fsf@lifelogs.com> <87k5ari5jh.fsf@xemacs.org> <86prkiiia2.fsf@lifelogs.com> <86ej0ygr5j.fsf@lifelogs.com> <861vwygpc6.fsf@lifelogs.com> <868wqzd06x.fsf@lifelogs.com> <867i6hrrh9.fsf@lifelogs.com> <86prk8q8yn.fsf@lifelogs.com> <87eiry58qs.fsf@jumptrading.com> <87skge2dm6.fsf@stupidchicken.com> <87ab2m562t.fsf@lifelogs.com> <871vnyot6m.fsf@stupidchicken.com> <87iqh84uao.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1249072254 29688 80.91.229.12 (31 Jul 2009 20:30:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Jul 2009 20:30:54 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 31 22:30:47 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MWykZ-0006Lr-3p for ged-emacs-devel@m.gmane.org; Fri, 31 Jul 2009 22:30:47 +0200 Original-Received: from localhost ([127.0.0.1]:38297 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWykY-00020x-Iy for ged-emacs-devel@m.gmane.org; Fri, 31 Jul 2009 16:30:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWyfV-0005Ax-2r for emacs-devel@gnu.org; Fri, 31 Jul 2009 16:25:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWyfP-00052k-Oz for emacs-devel@gnu.org; Fri, 31 Jul 2009 16:25:32 -0400 Original-Received: from [199.232.76.173] (port=42769 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWyfP-00052M-B3 for emacs-devel@gnu.org; Fri, 31 Jul 2009 16:25:27 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:53515 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MWyfO-0003SB-PJ for emacs-devel@gnu.org; Fri, 31 Jul 2009 16:25:27 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MWyfJ-00029h-8p for emacs-devel@gnu.org; Fri, 31 Jul 2009 20:25:21 +0000 Original-Received: from 38.98.147.130 ([38.98.147.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 31 Jul 2009 20:25:21 +0000 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 31 Jul 2009 20:25:21 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 17 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.130 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:qiUEw6lw2YPg1TPODwEDDWNQVe4= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:113485 Archived-At: On Fri, 31 Jul 2009 15:03:48 -0400 Stefan Monnier 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