From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#40968: 28.0.50; (apply nil) Date: Wed, 6 May 2020 11:28:49 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="69736"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 40968@debbugs.gnu.org To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 06 17:29:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jWLyv-000I21-Da for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 May 2020 17:29:09 +0200 Original-Received: from localhost ([::1]:43816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWLyu-0002Uk-FK for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 May 2020 11:29:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWLyo-0002Ty-0W for bug-gnu-emacs@gnu.org; Wed, 06 May 2020 11:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57569) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jWLyn-0000sY-NS for bug-gnu-emacs@gnu.org; Wed, 06 May 2020 11:29:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jWLyn-00044q-Kr for bug-gnu-emacs@gnu.org; Wed, 06 May 2020 11:29:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 May 2020 15:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40968 X-GNU-PR-Package: emacs Original-Received: via spool by 40968-submit@debbugs.gnu.org id=B40968.158877893715660 (code B ref 40968); Wed, 06 May 2020 15:29:01 +0000 Original-Received: (at 40968) by debbugs.gnu.org; 6 May 2020 15:28:57 +0000 Original-Received: from localhost ([127.0.0.1]:40882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWLyi-00044W-QJ for submit@debbugs.gnu.org; Wed, 06 May 2020 11:28:56 -0400 Original-Received: from mail-yb1-f175.google.com ([209.85.219.175]:41907) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWLyh-00044K-CQ for 40968@debbugs.gnu.org; Wed, 06 May 2020 11:28:55 -0400 Original-Received: by mail-yb1-f175.google.com with SMTP id w137so1182149ybg.8 for <40968@debbugs.gnu.org>; Wed, 06 May 2020 08:28:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=rhe6p4UuBPxUa1Ps6MU3VSXRhRaAeaOhOTv71kMP8Lw=; b=RKNZ62pdzfPi2tasKa/w6rSlzUsn/jpB9BGWWj+5QCORNuHc2qN/e3fO3j66HQRuf/ wSw7MMBimiF7tlF5L5ODtVkDR0qvHzDMyQAk/kAVLGTZDAnONi2+lAVAp49XlxXS+R37 fFKRsHycLb9+L8qcR8XG6Nkt+pCwUJK9C/bdAlo/iece3/iw8WO/vx6N4u6YDY4zb/4A aClCV0PGIhiL8OyFKMJK/x2PIDmSQW7/XT7be+6tv5408LciBNjGi7BJ+zf1VUZ57poG b0l4x48aRm/Y1QVDDZ1c96JavIO2ckF8aTCVS9w9AqozAaS8ovsq7wr2ho5l4W4iNCsW Ehsw== X-Gm-Message-State: AGi0PuadgyZ4F2oJ3UfzsxbeOlL6ER2ym7uYTnTkRi6j9JCznuNJ40WY Hxe+6oYmbnIpdaODKkQosj/5gRXg4VFCl++f2vA= X-Google-Smtp-Source: APiQypLQnjjx/21n+s8tHJ5gK0CYi2vQJj14rxl7hnUallvsg4/KWK8BsGPvRh/uZ0oJ7jR4SH4QEdq8YQy/w0jOpYM= X-Received: by 2002:a25:bb08:: with SMTP id z8mr1612348ybg.129.1588778929630; Wed, 06 May 2020 08:28:49 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 6 May 2020 11:28:49 -0400 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:179824 Archived-At: Pip Cet writes: > Is the function signature relevant for anything but eldoc? Besides the docstring, the manual documents it. The suggested form is unusual and makes it harder to understand, IMHO. >> apply is fundamental to Lisp, and has been defined like this for a >> long time. > > I don't know about that. Anything but the two-argument form of apply > strikes me as rather dialect-dependent, but I may be wrong. If I understand correctly, you propose a three argument form: (apply FUNCTION ARGUMENT &rest ARGUMENTS) This is what I find unusual. It should really be either (apply FUNCTION &rest ARGUMENTS) or (apply FUNCTION ARGUMENTS) But since we already have the former, we are better to stick with that. Maybe there's a case to be made for a syntactic alternative to "&rest" which disallows nil, which I guess is the issue here? But we can also just signal an error in this case. Racket does the latter, as one data point: > (define foo (lambda () 1)) > (apply foo nil) ; nil: undefined; ; cannot reference an identifier before its definition ; in module: top-level ; [,bt for context] BTW, I don't see a big difference conceptually between '&rest ARGUMENTS' and 'ARGUMENTS'. The former is just syntactic sugar, right? >> See the definition of "The Universal S-Function apply" in >> John McCarthy's paper: [1] >> >> apply[f;args] =eval[cons[f;appq[args]];NIL], > > I must admit I don't know how appq is defined. My point is mainly that it has two arguments: f and args. Best regards, Stefan Kangas