unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stefan Monnier" <monnier+gnu/emacs@RUM.cs.yale.edu>
Cc: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>,
	Jason Rumney <jasonr@gnu.org>,
	rms@gnu.org, emacs-devel@gnu.org
Subject: Re: featurep
Date: Tue, 19 Mar 2002 18:19:22 -0500	[thread overview]
Message-ID: <200203192319.g2JNJMO09092@rum.cs.yale.edu> (raw)
In-Reply-To: 5x7ko8yx1y.fsf@kfs2.cua.dk

> > 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

Yes, that was my intention.

> and that has never been the intention.

No, indeed, I understand that it is way past any immediate concern
and as I said, I have no clue how to implement such a thing.

> > 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?

Why does it matter ?
What would the code look like using your :feature thing ?
Most likely your code can handle a small fixed number of different
combination of features.  It can use :feature to decide which one
of the alternatives to choose or it can just try them in order
until one of them succeeds.
I.e. I don't see how the "what would you try next" question is relevant
since the problem also shows up with :feature.

> In any case, I disagree, but I don't want to be religious about this,
> so I'll change the code to use featurep.

Is it even necessary ?
I expect that "try-it-and-see" will already catch all relevant cases.
I'm really not convinced that we need anything more, so I wouldn't
bother with anything more until there's some evidence that it
is needed.  Of course, maybe you have that evidence, but I haven't seen it.


	Stefan


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


  reply	other threads:[~2002-03-19 23:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200203190844.g2J8iOq09224@wijiji.santafe.edu>
2002-03-19 13:39 ` featurep Kim F. Storm
2002-03-19 19:24   ` featurep Jason Rumney
2002-03-19 21:20     ` featurep Stefan Monnier
2002-03-19 23:09       ` featurep Kim F. Storm
2002-03-19 23:19         ` Stefan Monnier [this message]
2002-03-19 23:48           ` featurep Kim F. Storm
2002-03-20  0:03             ` featurep Stefan Monnier
2002-03-19 22:59     ` featurep Kim F. Storm
2002-03-21  9:04     ` featurep Richard Stallman
2002-03-21 13:12       ` featurep Kim F. Storm
2002-03-23  2:35         ` featurep Richard Stallman
2002-03-21 16:44       ` featurep Stefan Monnier
2002-03-21 19:47         ` featurep Kim F. Storm
2002-03-22  0:39           ` featurep Stefan Monnier
2002-03-22  9:14             ` featurep Kim F. Storm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200203192319.g2JNJMO09092@rum.cs.yale.edu \
    --to=monnier+gnu/emacs@rum.cs.yale.edu \
    --cc=emacs-devel@gnu.org \
    --cc=jasonr@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).