emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs 25.0.04: Feature Request: Make called-interactively-p's argume


From: Robert Weiner
Subject: Re: Emacs 25.0.04: Feature Request: Make called-interactively-p's argument optional
Date: Wed, 29 Jun 2016 16:54:40 -0400

On Wed, Jun 29, 2016 at 4:02 PM, Richard Stallman <address@hidden> wrote:
> Telling people to ignore the choice, or choose at random, while
> the choice is still necessary, would not be better design.

That is an argument for never allowing optional parameters to
functions.  But I would assume you are not against these entirely.
Any time you make an argument optional, the function caller still has
the function signature and documentation to rely on when deciding how
to make the call.  The only difference is he has the power to avoid
sending the argument when he need not.

There was a function, interactive-p, that many people used without any
arguments and found that useful.  Now (called-interactively-p
'interactive) is equivalent but makes code much uglier (I know as I
just changed all my code to use it and it is much less readable now).
The request is for a function of no arguments that does what
interactive-p did; it could be called-interactively-p with an optional
argument signature or it could be another function that provides an
equivalent.

Does that affect your thinking?

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]