unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Augusto Stoffel <arstoffel@gmail.com>
To: Richard Stallman <rms@gnu.org>
Cc: 56875@debbugs.gnu.org, Lars Ingebrigtsen <larsi@gnus.org>, eliz@gnu.org
Subject: bug#56875: 29.0.50; [PATCH] Add thread-as macro
Date: Fri, 05 Aug 2022 09:44:50 +0200	[thread overview]
Message-ID: <87zggj6snh.fsf@gmail.com> (raw)
In-Reply-To: <E1oJ5Lg-0005fq-Sm@fencepost.gnu.org> (Richard Stallman's message of "Tue, 02 Aug 2022 23:47:08 -0400")

On Tue,  2 Aug 2022 at 23:47, Richard Stallman <rms@gnu.org> wrote:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>  > +     (thread-as x
>  > +       4
>  > +       (- 10 x)
>  > +       (/ x 2))
>
> I propose a different syntax which is more Lispy than thread-as, and
> more self-evident:
>
> (let-successive ((x 4
>                     (- 10 x)))
>   (/ x 2))
>
> A Lisper can guess what it means, without having read a description.
>
> It lends itself to a generalization where there is more than
> one bound variable, each of which can have several values:
>
> (let-successive ((x 4
>                     (- 10 x))
>                  (y 6
>                     (- 12 y)))
>   (* x y))
>  => 36
>
> The values after the first can refer to all of the variables,
> since all of them are already bound (to the previous values)
> at that point.

This is an interesting alternative.  I'd suggest to wait for other
opinions about the need for this kind of macro in general, and which
variant is preferred.





  reply	other threads:[~2022-08-05  7:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-01 17:06 bug#56875: 29.0.50; [PATCH] Add thread-as macro Augusto Stoffel
2022-08-02  3:40 ` Richard Stallman
2022-08-02  6:57   ` Augusto Stoffel
2022-08-02 10:17 ` Lars Ingebrigtsen
2022-08-02 11:24   ` Eli Zaretskii
2022-08-02 12:56     ` Augusto Stoffel
2022-08-02 13:06       ` Eli Zaretskii
2022-08-03  3:47   ` Richard Stallman
2022-08-05  7:44     ` Augusto Stoffel [this message]
2022-09-02 10:46       ` Lars Ingebrigtsen

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=87zggj6snh.fsf@gmail.com \
    --to=arstoffel@gmail.com \
    --cc=56875@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.org \
    --cc=rms@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).