From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Weiner Newsgroups: gmane.emacs.devel Subject: Re: Emacs 25.0.04: Feature Request: Make called-interactively-p's argument optional Date: Wed, 29 Jun 2016 16:54:40 -0400 Message-ID: References: Reply-To: rswgnu@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1467234289 22721 80.91.229.3 (29 Jun 2016 21:04:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Jun 2016 21:04:49 +0000 (UTC) Cc: emacs-devel To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 29 23:04:32 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bIMes-0007OH-0v for ged-emacs-devel@m.gmane.org; Wed, 29 Jun 2016 23:04:30 +0200 Original-Received: from localhost ([::1]:45793 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIMeo-0006hC-0x for ged-emacs-devel@m.gmane.org; Wed, 29 Jun 2016 17:04:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIMW4-0003qD-7X for emacs-devel@gnu.org; Wed, 29 Jun 2016 16:55:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIMVz-0002kJ-5q for emacs-devel@gnu.org; Wed, 29 Jun 2016 16:55:24 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55312) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIMVz-0002kB-2J for emacs-devel@gnu.org; Wed, 29 Jun 2016 16:55:19 -0400 Original-Received: from mail-ob0-f180.google.com ([209.85.214.180]:33625) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bIMVq-0003HM-Ie; Wed, 29 Jun 2016 16:55:10 -0400 Original-Received: by mail-ob0-f180.google.com with SMTP id xn17so43447212obc.0; Wed, 29 Jun 2016 13:55:10 -0700 (PDT) X-Gm-Message-State: ALyK8tJfDE/Mwl7p6Pxi0E0VgjT2IrJfLrikZxX9QpZR9RNnE2QqS7nHi1CoCO3JOmysvDShlrT6I7iQ5+dbuw== X-Received: by 10.202.192.214 with SMTP id q205mr7036533oif.176.1467233709790; Wed, 29 Jun 2016 13:55:09 -0700 (PDT) Original-Received: by 10.202.212.143 with HTTP; Wed, 29 Jun 2016 13:54:40 -0700 (PDT) In-Reply-To: X-Gmail-Original-Message-ID: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:204951 Archived-At: On Wed, Jun 29, 2016 at 4:02 PM, Richard Stallman 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