unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Robert Cochran <robert-emacs@cochranmail.com>
Cc: Philipp Stephani <p.stephani2@gmail.com>, 23957@debbugs.gnu.org
Subject: bug#23957: [PATCH] Make fboundp an alias for symbol-function
Date: Tue, 12 Jul 2016 20:06:54 +0000 (UTC)	[thread overview]
Message-ID: <382b03a2-dac4-4459-96ba-c8bdbe02ae57@default> (raw)
In-Reply-To: <87eg6yvfgm.fsf@cochranmail.com>

> I didn't put too much thought into reading the FIXME;

Nor did I. ;-)

> I figured that someone smarter than myself knew what they were
> doing when requesting the change.

Yes, no doubt s?he had a good reason.  Or at least a reason.
But apparently it was not recorded, so we can only wonder or
guess.

My guess is that the person just figured that, like `member',
people can use `symbol-function' as a general Boolean - which
is true.  But `fboundp' has been around forever, and there is
no telling what code might expect its value to be either `t'
or `nil'.  And if someone really wants to use `symbol-function'
to either get the function or test whether there is one, s?he
can already do that.

> I'd personally argue that anyone making an explicit check for t, or
> anything that particularly needs t rather than any true value is just
> asking for lossage, but I can see why people would disagree with that
> assertion.

It doesn't matter what we might think of such a check.  The point
is that such checks might exist, and there is really no good
reason (that I can see) for breaking such code.  Again: anyone
can already use `symbol-function' to get the desired effect, and
its name speaks much better to the combined behavior desired in
that case.

> FWIW, In every placed I changed occurrences of fboundp to
> symbol-function, both in Lisp and C, used only the truthiness
> of the return rather than explicitly checking for t.

That's irrelevant (IMO).  The code that GNU distributes with
Emacs is but a small part of the Emacs-Lisp code that is out
there.

> I also ran the test suite with and without my patch applied,
> and noticed no difference in the number of failing tests.

Again - you were testing in the tiny GNU Emacs distributed-code
sandbox.  The Emacs world is a much bigger box.

> Anyways, I'm willing to toss this patch and do something else
> if that is the general consensus.

I can't speak for the consensus, but that would be my hope.  And
thanks for pitching in!  Sorry to seem so critical of a first foray
into helping.





  reply	other threads:[~2016-07-12 20:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-12  7:08 bug#23957: [PATCH] Make fboundp an alias for symbol-function Robert Cochran
2016-07-12 16:13 ` Drew Adams
2016-07-12 17:40   ` Philipp Stephani
2016-07-12 17:49     ` Drew Adams
2016-07-12 19:11       ` Robert Cochran
2016-07-12 20:06         ` Drew Adams [this message]
2016-07-12 23:02           ` Robert Cochran
2016-07-13  2:14             ` Drew Adams
2016-07-12 19:20       ` Sora Firestorm
2016-07-12 20:10         ` Drew Adams
2016-07-12 20:35     ` Stefan Monnier
2016-07-13  5:35       ` Robert Cochran
2016-07-14 22:53         ` Robert Cochran

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=382b03a2-dac4-4459-96ba-c8bdbe02ae57@default \
    --to=drew.adams@oracle.com \
    --cc=23957@debbugs.gnu.org \
    --cc=p.stephani2@gmail.com \
    --cc=robert-emacs@cochranmail.com \
    /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).