unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Howard Melman <hmelman@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: master baf1a7a4a0: Turn gv-synthetic-place into a function
Date: Thu, 22 Sep 2022 10:11:14 -0400	[thread overview]
Message-ID: <lyr1038pod.fsf@Lumet.home> (raw)
In-Reply-To: 87y1ub7kjp.fsf@gnus.org

Lars Ingebrigtsen <larsi@gnus.org> writes:

> So I'd rather keep "generalized variable", long and unwieldy as it is.
> I think we should avoid "place" as much as possible, though.

+1

I've written elisp for decades but am not completely
comfortable with the "new" stuff like cl-lib and gv and it
took me a little to wrap my head around setf.

I like the term "Generalized Variable" and would prefer to
see "gv" used instead of "place".

The beginning of the Generalized Variables section of the
elisp manual is fine for me and mostly the sub-section
"12.17.1 The ‘setf’ Macro".  But referring to "the left
side" of a sexp doesn't help me, e.g., "The ‘setf’ form is
like ‘setq’, except that it accepts arbitrary place forms on
the left side rather than just symbols. For example, ‘(setf
(car a) b)’..."  I can follow the rest but I don't think of
"the first argument" to setq as "the left side".

And I think rather than

 -- Macro: setf [place form]...
     This macro evaluates FORM and stores it in PLACE, which must be a
     valid generalized variable form.  If there are several PLACE and
     FORM pairs, the assignments are done sequentially just as with
     ‘setq’.  ‘setf’ returns the value of the last FORM.

I'd prefer

 -- Macro: setf [gv val]...
     This macro evaluates VAL and stores it in GV, which must be a
     valid generalized variable form.  If there are several GV and
     VAL pairs, the assignments are done sequentially just as with
     ‘setq’.  ‘setf’ returns the value of the last VAL.

I find it much easier to process GV as "generalized
variable" rather than "place", as long as each docstring where
I run across GV uses "generalized variable" someplace so I
could look up the term.  I'm less invested in changing
"form" above to "val" but did it for two reasons: it matches
what setq calls its second argument (and the actual setf
docstring) and it doesn't reuse the term "form" which is
used in the description of the first argument.  I'm fine
thinking of lisp forms, but since everything is a form, I'd
rather actually name arguments to differentiate them when
possible. 

Just my $0.02

-- 

Howard




  parent reply	other threads:[~2022-09-22 14:11 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-18 16:13 master baf1a7a4a0: Turn gv-synthetic-place into a function Eli Zaretskii
2022-09-19  6:16 ` Michael Heerdegen
2022-09-19 11:38   ` Eli Zaretskii
2022-09-20  7:28     ` Michael Heerdegen
2022-09-20  7:50       ` Emanuel Berg
2022-09-20 11:19       ` Eli Zaretskii
2022-09-20 14:36         ` Michael Heerdegen
2022-09-20 16:27           ` Eli Zaretskii
2022-09-21  5:40             ` Michael Heerdegen
2022-09-21 14:19               ` Eli Zaretskii
2022-09-21  8:35             ` Emanuel Berg
2022-09-21  8:32           ` Emanuel Berg
2022-09-21 13:52             ` Michael Heerdegen
2022-09-21 14:20               ` Stefan Monnier
2022-09-21 15:31                 ` Eli Zaretskii
2022-09-21 16:14                   ` Stefan Monnier
2022-09-22 10:47                     ` Lars Ingebrigtsen
2022-09-22 11:53                       ` Michael Heerdegen
2022-09-22 14:27                         ` Michael Heerdegen
2022-09-22 16:30                         ` Augusto Stoffel
2022-09-22 17:27                           ` [External] : " Drew Adams
2022-09-22 17:47                             ` Michael Heerdegen
2022-09-23 15:07                         ` Lars Ingebrigtsen
2022-09-22 12:26                       ` Yuri Khan
2022-09-22 14:11                       ` Howard Melman [this message]
2022-09-22 16:45                         ` Eli Zaretskii
2022-09-22 19:55                           ` Howard Melman
2022-09-23  6:19                             ` Eli Zaretskii
2022-09-23 13:42                               ` Howard Melman
2022-09-23 15:49                                 ` Stefan Monnier
2022-09-23 18:05                                   ` Howard Melman
2022-09-23 15:54                                 ` Eli Zaretskii
2022-09-23 18:11                                   ` Howard Melman
2022-09-23 19:00                                     ` Eli Zaretskii
2022-09-23  9:41                           ` Michael Heerdegen
2022-09-23 10:53                             ` Eli Zaretskii
2022-09-23 17:26                               ` Emanuel Berg
2022-09-22 10:56                     ` Michael Heerdegen
2022-09-30 23:18                     ` Emanuel Berg
2022-09-30 23:30                 ` Emanuel Berg
2022-09-19 12:06   ` Stefan Monnier
2022-09-20  7:22     ` Michael Heerdegen

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=lyr1038pod.fsf@Lumet.home \
    --to=hmelman@gmail.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).