emacs-devel
[Top][All Lists]
Advanced

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

Re: Code for cond*


From: Richard Stallman
Subject: Re: Code for cond*
Date: Tue, 23 Jan 2024 08:39:33 -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. ]]]

  > * "making bindings that cover the rest of the body...the ability to make 
  > bindings and continue with further clauses"

  > As several here have mentioned, this is not universally perceived as an 
  > advance.

You're entitled to your opinion.  I consider this an important
advance, so I list it as one.

  > * "use of ordinary Lisp expressions as conditions in clauses"

  > Pcase can already do this with its `guard' pattern, which explicitly 
  > demarcates an ordinary Lisp expression.

Maybe you sare right about this one.

  > * "matching patterns against various data objects (not forcibly the same 
  > one)"

  > Pcase can already do this (e.g. with its `guard' pattern).

I don't see how `guard' does this job.  Can a guard pattern
destructure?  As I understand it, it contains only a Lisp expression.

                                                                As well, it 
  > destructures objects that cond* does not, such as maps, structs, and 
  > EIEIO objects.

I will implement the structure pattern when I get the necessary information
to do it.  I would like this to get done, but I can wait for you to tell
me what I need to know.

  > As well, it's already a complaint by some that having to learn Pcase is 
  > a burden.  How will that burden be helped by having to learn both Pcase 
  > and cond*?

By reducing the use of pcase, it will make code simpler to read.

If pcase lacked features for certain specific jobs, it would be esay
to fix that by adding a few features.  However, the problem with pcase
is that it has too many features for the job it does.  cond* does the
same jobs with fewer features because they work together better.

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