unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
To: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: cond*
Date: Mon, 25 Dec 2023 23:03:17 -0500	[thread overview]
Message-ID: <E1rHyez-0003MY-IA@fencepost.gnu.org> (raw)
In-Reply-To: <CAO48Bk_b48Q+0QHQsNK6zOtj1VVHUx7D5ciqiYp-T1qvLOLa5Q@mail.gmail.com> (message from Pedro Andres Aranda Gutierrez on Sat, 23 Dec 2023 07:17:09 +0100)

[[[ 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. ]]]

  > wouldn't a clause starting with t be the most natural choice?
  > Just because it would mimic cond and make things consistent.

A no-exit clause in cond* executes unconditionally but does not
terminate the cond*.  A cond clause that start with t does terminate
the cond, which is why it is useful only as the last clause.

The no-exit clause in cond* is an extension in capability over cond.
It is not the same as any way of using cond itself.  Whatever syntax
is used to specify a no-exit clause will not be parallel to the syntax
of cond.

That's not a reason there shouldn't be a new feature.

These are the four choices that seem plausible:

> * A clause with one element.
> * A clause that starts with t.
> * A clause that starts with nil.
> * A keyword.

I am interested in people's preferences between them.

If a no-exit clause is indicated by its first element, then a final
element in the clause, with no side effects, will make no difference
unless that clause is the last clause.  But if it is the last clause,
there is no need to make it a "no-exit" clause.

So you could add a keyword at the end -- :no-exit or :fall-through or
whatever you like -- and it would not change anything, but might serve
as a kind of comment.

A real comment, perhaps `;; no-exit clause', could serve the same
purpose.

You could add them at the beginning, too.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





  parent reply	other threads:[~2023-12-26  4:03 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-23  6:17 Re: cond* Pedro Andres Aranda Gutierrez
2023-12-25  1:32 ` Bob Rogers
2023-12-25  3:49   ` [External] : " Drew Adams
2023-12-25  4:53     ` Bob Rogers
2023-12-29  3:51     ` Richard Stallman
2023-12-29  3:51     ` Richard Stallman
2023-12-29  7:11       ` Eli Zaretskii
2023-12-31  3:15         ` Richard Stallman
2023-12-26  4:03 ` Richard Stallman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-12-12  3:43 Instead of pcase Richard Stallman
2023-12-13  1:32 ` Adam Porter
2023-12-16  4:23   ` Richard Stallman
2023-12-18  4:09     ` cond* Richard Stallman
2023-12-18 10:08       ` cond* João Távora
2023-12-21  4:20         ` cond* Richard Stallman
2023-12-21  9:50           ` cond* João Távora
2023-12-24  3:57             ` cond* Richard Stallman
2023-12-21 14:10           ` cond* Ihor Radchenko
2023-12-24  3:57             ` cond* Richard Stallman
2023-12-25 14:14               ` cond* Ihor Radchenko
2023-12-19  3:49       ` cond* Richard Stallman
2023-12-19 12:13         ` cond* João Távora
2023-12-22  3:14           ` cond* Richard Stallman
2023-12-22  7:27             ` cond* Philip Kaludercic
2023-12-25  3:41               ` cond* Richard Stallman
2023-12-25 12:32                 ` cond* Philip Kaludercic
2023-12-27  4:54                   ` cond* Richard Stallman
2023-12-27 14:34                     ` cond* Philip Kaludercic
2023-12-29  3:52                       ` cond* Richard Stallman
2024-01-01 14:49                         ` cond* Ihor Radchenko
2024-01-03  4:13                           ` cond* Richard Stallman
2024-01-03 15:57                             ` cond* Ihor Radchenko
2024-01-05  4:23                               ` cond* Richard Stallman
2024-01-06 14:33                                 ` cond* Ihor Radchenko
2024-01-08  3:47                                   ` cond* Richard Stallman
2024-01-10 13:03                                     ` cond* Ihor Radchenko
2024-01-13  3:50                                       ` cond* Richard Stallman
2024-01-13  6:32                                         ` cond* Adam Porter
2024-01-16  3:31                                           ` cond* Richard Stallman
2024-01-13 19:47                                         ` cond* Ihor Radchenko
2024-01-15  3:13                                           ` cond* Richard Stallman
2024-01-08  3:47                                   ` cond* Richard Stallman
2024-01-08 15:13                                     ` cond* Ihor Radchenko
2024-01-27  3:37                                       ` cond* Richard Stallman
2024-02-01 16:26                                         ` cond* Ihor Radchenko
2024-02-03  3:36                                           ` cond* Richard Stallman
2024-02-03 16:52                                             ` cond* Ihor Radchenko
2024-01-03  4:13                           ` cond* Richard Stallman
2024-01-03 15:48                             ` cond* Ihor Radchenko
2024-01-06  4:31                               ` cond* Richard Stallman
2024-01-06 13:09                                 ` cond* Ihor Radchenko
2024-01-08  3:47                                   ` cond* Richard Stallman
2024-01-08 15:26                                     ` cond* Ihor Radchenko
2024-01-27  3:37                                       ` cond* Richard Stallman
2024-01-03  4:13                           ` cond* Richard Stallman
2024-01-03 15:50                             ` cond* Ihor Radchenko
2024-01-06  4:31                               ` cond* Richard Stallman
2024-01-06 13:13                                 ` cond* Ihor Radchenko
2024-01-08  3:47                                   ` cond* Richard Stallman
2024-01-08 15:35                                     ` cond* Ihor Radchenko
2023-12-18  4:09     ` cond* Richard Stallman
2023-12-18  5:41       ` cond* Adam Porter
2023-12-21  4:20         ` cond* Richard Stallman

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=E1rHyez-0003MY-IA@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=paaguti@gmail.com \
    /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).