From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: featurep instead of bound tests Date: Thu, 24 Jan 2008 21:49:04 -0800 Message-ID: <200801250549.m0P5n5uZ025628@sallyv1.ics.uci.edu> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1201240297 11463 80.91.229.12 (25 Jan 2008 05:51:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Jan 2008 05:51:37 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 25 06:51:57 2008 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 1JIHTo-0004LM-5u for ged-emacs-devel@m.gmane.org; Fri, 25 Jan 2008 06:51:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIHTN-0003TW-Cb for ged-emacs-devel@m.gmane.org; Fri, 25 Jan 2008 00:51:29 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JIHTH-0003TO-Pt for emacs-devel@gnu.org; Fri, 25 Jan 2008 00:51:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JIHTF-0003T0-55 for emacs-devel@gnu.org; Fri, 25 Jan 2008 00:51:22 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIHTF-0003Sx-1C for emacs-devel@gnu.org; Fri, 25 Jan 2008 00:51:21 -0500 Original-Received: from sallyv1.ics.uci.edu ([128.195.1.109]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1JIHTE-0008U8-Fu for emacs-devel@gnu.org; Fri, 25 Jan 2008 00:51:20 -0500 X-ICS-MailScanner-Watermark: 1201844946.76593@iuRHFidW2jOatUTM2yR83Q Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by sallyv1.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id m0P5n5uZ025628; Thu, 24 Jan 2008 21:49:05 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Thu, 24 Jan 2008 17:48:26 -0500") Original-Lines: 24 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) 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:87473 Archived-At: Stefan Monnier writes: > >> --- gnus/ChangeLog 24 Jan 2008 07:47:37 -0000 1.633 > >> +++ gnus/ChangeLog 24 Jan 2008 15:14:50 -0000 1.634 > >> @@ -1,3 +1,9 @@ > >> +2008-01-24 Dan Nicolaescu > >> + > >> + * sieve.el (sieve-make-overlay, sieve-overlay-put, sieve-overlays-at): > >> + * message.el (message-beginning-of-line): Use featurep instead of bound > >> + tests in order to resolve conditionals at compile time. > > > In the past, I've been told that it's preferable to use fbound tests > > instead of Emacs flavor or version tests. So I'm surprised by changes > > like these... > > Agreed. I see 2 better solutions: > 1 - use (require 'outline) > 2 - teach the byte-optimizer that (fboundp 'make-overlay) will always be t. That has the problem that XEmacs would have to teach its compiler that it is always false. Or if the test was (fboundp 'make-extent) emacs will have to know it's always false. IMO for extents vs overlays and zmacs-* the featurep test is the best option.