From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Drew Adams <drew.adams@oracle.com>
Cc: emacs-devel@gnu.org
Subject: Re: `read--expression' and `read-minibuffer'
Date: Tue, 06 Sep 2016 23:46:44 -0400 [thread overview]
Message-ID: <jwvy434bd63.fsf-monnier+Inbox@gnu.org> (raw)
In-Reply-To: <91f3ab85-e033-4e1d-a3c2-66c964ea82bc@default> (Drew Adams's message of "Tue, 6 Sep 2016 20:01:45 -0700 (PDT)")
> 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
next prev parent reply other threads:[~2016-09-07 3:46 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-03 18:20 `read--expression' and `read-minibuffer' Drew Adams
2016-09-04 4:40 ` Stefan Monnier
2016-09-04 5:53 ` Drew Adams
2016-09-04 6:27 ` Stefan Monnier
2016-09-04 15:39 ` Drew Adams
2016-09-05 2:36 ` Stefan Monnier
2016-09-06 19:02 ` Davis Herring
2016-09-06 20:29 ` Drew Adams
2016-09-07 0:04 ` Stefan Monnier
2016-09-07 3:01 ` Drew Adams
2016-09-07 3:46 ` Stefan Monnier [this message]
2016-09-07 5:54 ` Drew Adams
2016-09-07 12:12 ` Stefan Monnier
2016-09-09 21:41 ` Drew Adams
2016-09-07 13:25 ` Herring, Davis
2016-09-07 16:02 ` Drew Adams
2016-09-07 17:01 ` Davis Herring
2016-09-07 21:01 ` Drew Adams
2016-09-07 22:17 ` Michael Heerdegen
2016-09-07 22:30 ` Stefan Monnier
2016-09-07 22:50 ` Michael Heerdegen
2016-09-08 0:19 ` Stefan Monnier
2016-09-06 21:05 ` Stefan Monnier
2016-09-06 21:35 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvy434bd63.fsf-monnier+Inbox@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).