From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: featurep Date: 20 Mar 2002 00:09:29 +0100 Sender: emacs-devel-admin@gnu.org Message-ID: <5x7ko8yx1y.fsf@kfs2.cua.dk> References: <200203190844.g2J8iOq09224@wijiji.santafe.edu> <5xg02wd6cm.fsf@kfs2.cua.dk> <200203192120.g2JLKVQ08387@rum.cs.yale.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1016674925 27152 127.0.0.1 (21 Mar 2002 01:42:05 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 21 Mar 2002 01:42:05 +0000 (UTC) Cc: Jason Rumney , rms@gnu.org, emacs-devel@gnu.org Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16nraf-00073o-00 for ; Thu, 21 Mar 2002 02:42:05 +0100 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16nrgg-0002kb-00 for ; Thu, 21 Mar 2002 02:48:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16nraY-0005yt-00; Wed, 20 Mar 2002 20:41:58 -0500 Original-Received: from delysid.gnu.org ([158.121.106.20]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16np1i-0004Wm-00; Wed, 20 Mar 2002 17:57:51 -0500 Original-Received: from mail.filanet.dk ([195.215.206.179]) by delysid.gnu.org with smtp (Exim 3.34 #2) id 16nSvQ-0005ry-00; Tue, 19 Mar 2002 18:21:52 -0500 Original-Received: from kfs2.cua.dk.cua.dk (unknown [10.1.82.3]) by mail.filanet.dk (Postfix) with SMTP id 5CB427C035; Tue, 19 Mar 2002 23:08:32 +0000 (GMT) Original-To: "Stefan Monnier" In-Reply-To: <200203192120.g2JLKVQ08387@rum.cs.yale.edu> Original-Lines: 45 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:2070 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2070 "Stefan Monnier" writes: > > storm@cua.dk (Kim F. Storm) writes: > > > > > However, for a usage point of view, I don't really see why it > > > matters, and IMHO, using featurep will be _less_ intuitive. > > > For example, I think using > > > > > > (if (and (make-network-process :feature :family 'local) > > > (make-network-process :feature :datagram t)) > > > > Having make-network-process doing something other than making a > > network process is not a more intuitive solution than featurep. > > Agreed. I also agree that `featurep' is not a perfect answer, tho. > Ideally, what I'd like is something like > > (featuredp '(make-network-process :family 'local)) > > where `featuredp' simply takes a function together with a set of > arguments and returns whether or not that call is "supported". > It would first check the fboundness of the function, the number of arguments > and all those things. I think this would be overkill. If we go that route, then it should apply to all functions - and that has never been the intention. > > But I have no good idea how to go about implementing this thing, so > as a first step, I think that it should be good enough just to make > `make-network-process' fail when called with arguments requiring > unsupported features. After all, it's generally the case that if > the feature is supported, then we do want to make the function call, > so we might as well call the function and see if it worked. Ok, but if you combine :family 'local and :datagram t, and make-network-process returns nil, you really don't know whether it's because it doesn't support local sockets or datagrams -- so what would you try next? In any case, I disagree, but I don't want to be religious about this, so I'll change the code to use featurep. -- Kim F. Storm http://www.cua.dk _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel