Subject: RE: [External] : Re: bug#76055: 29.4; Doc of string-empty-p

From: Drew Adams <[email-masked]>
Date: Wed, 5 Feb 2025 21:13:05 +0000

> > To be more precise: Please do it for each
> > such function where you can guess that this
> > behavior isn't just a side effect or that's
> > likely to be changed without notice.
> 
> How can anyone know that?

By looking at the name of the function and the
function definition, and thinking about how
the function is used and expected to be used?

A function such as `string-empty-p' is a prime
candidate for checking and adding such mention.

Its name (and its current doc string) provides
no clue that it handles a symbol argument as
if you were passing (symbol-name <the symbol>).

If a function name shouts that the function's
only about a string, its doc should mention it if
that's not the case.

> > My guess is that 90% or more of the cases
> > where we do this are intentional - we
> > explicitly _want_ to let users use a symbol
> > in place of a string.  That means it's in
> > the _design_, not just an implementation
> > side effect.
> 
> That a function calls string= doesn't yet mean its author meant to
> allow symbols.

Of course not.  It requires thinking about the
function's definition and how it's expected to
be used.

At least for _new_ functions that use primarily
strings as args, the _author_ should know why it
was decided to allow symbols instead of just
strings.