Subject: RE: bug#23957: [PATCH] Make fboundp an alias for symbol-function

From: Drew Adams <[email-masked]>
Date: Tue, 12 Jul 2016 20:06:54 +0000 (UTC)

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