emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cond*


From: Richard Stallman
Subject: Re: cond*
Date: Mon, 25 Dec 2023 23:03:17 -0500

[[[ 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)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]