From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: `read--expression' and `read-minibuffer' Date: Tue, 06 Sep 2016 23:46:44 -0400 Message-ID: References: <60e5e890-6f50-4f38-a74f-e82ff83b24dc@default> <8e6be928-75ae-4714-bf03-d6505954cf21@default> <10888855-8ce3-648f-82ac-2b9e1409effc@lanl.gov> <91f3ab85-e033-4e1d-a3c2-66c964ea82bc@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1473219870 11326 195.159.176.226 (7 Sep 2016 03:44:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 7 Sep 2016 03:44:30 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 07 05:44:26 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bhTmc-0001cX-B9 for ged-emacs-devel@m.gmane.org; Wed, 07 Sep 2016 05:44:18 +0200 Original-Received: from localhost ([::1]:37658 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhTma-000480-4L for ged-emacs-devel@m.gmane.org; Tue, 06 Sep 2016 23:44:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhTm1-00047j-2e for emacs-devel@gnu.org; Tue, 06 Sep 2016 23:43:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhTlv-0000dd-28 for emacs-devel@gnu.org; Tue, 06 Sep 2016 23:43:40 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:52664) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhTlu-0000cq-SU for emacs-devel@gnu.org; Tue, 06 Sep 2016 23:43:34 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id u873hVxN025573; Tue, 6 Sep 2016 23:43:31 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 964C0662A6; Tue, 6 Sep 2016 23:46:44 -0400 (EDT) In-Reply-To: <91f3ab85-e033-4e1d-a3c2-66c964ea82bc@default> (Drew Adams's message of "Tue, 6 Sep 2016 20:01:45 -0700 (PDT)") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5789=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5789> : inlines <5189> : streams <1696517> : uri <2283677> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 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:207238 Archived-At: > Your analogy is OK. I wouldn't speak of an "Elisp expression" here, > since to me that just means any expression - sexp that you can > construct with Emacs Lisp. What would you call it then? What did you expect an "Elisp expression" to mean when contrasted to an "S-exp"? I really can't understand how you could have gotten confused. > See above. Any Lisp sexp can be related to Elisp code. Any data > can be a piece of some code. That's irrelevant. 'int b*;' and 'a[b' can appear in a C program, but they're not C expressions. Similarly, ((a . 2) (b . 3)) is *not* an Elisp expression, regardless of whether it can appear inside an Elisp expression. > It's what Davis was trying to distinguish `read--expression' as: > reading an expression "intended for evaluation" (paraphrasing). I don't think I talked about "expression" intended for evaluation but "S-exp" intended for evaluation. For me the name "expression" already tends to have a connotation of being a piece of code that can be evaluated (e.g. in contexts where you'd also see related concepts like declaration, instruction, data, ...), so I use "S-exp" to make it clear I'm only talking about the XML-like syntactic level independent from any associated semantic. > Likewise, you. You both tried to distinguish what it does as > reading an expression that might be evaluated (even though it can > also read expressions that cannot, without raising an error). How else would you describe the difference between - a thingy that uses the Elisp reader syntax and whose semantics we know nothing about. - that same thingy but knowing that it's a chunk of Elisp code. ? > I don't have a name for that. "Expression" doesn't say more than > "sexp", to me - it's just as general. If we confuse those two concepts somewhere, it's a bug. >> > 1. That's not a good reason to make it "internal". >> I already said that it's internal for no particular reason. > Not really. You said that it's internal because it's easier to > later make a name non-internal than the reverse. Which is true, > but which is not a great reason, in itself: it would apply to > every new function. We violently agree: since it would apply to every function, it's not a particular reason. Stefan