unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: Eli Zaretskii <eliz@gnu.org>,
	stefankangas@gmail.com, emacs-devel@gnu.org
Subject: Re: Installing cond* in core
Date: Sun, 28 Jan 2024 19:14:06 +0000	[thread overview]
Message-ID: <ZbanfmJ8nM8FK1dQ@ACM> (raw)
In-Reply-To: <0f7c3969-7b57-4ce4-87e7-5f86e712c2b5@gutov.dev>

Hello, Dmitry.

On Sun, Jan 28, 2024 at 18:54:18 +0200, Dmitry Gutov wrote:
> Hi Alan,

> On 28/01/2024 16:32, Alan Mackenzie wrote:

[ .... ]

> >> We're yet to see whether cond* is any better in those areas.

> > This is true, but it's highly likely cond* will be better.  It's
> > being designed by an expert designer, and has been through a phase of
> > open comment and revision.  Also, it takes advantage of the
> > experience of pcase.

> A new macro that went through a few rounds of revision with no real 
> consumers yet vs a macro that's been in use for 14 years.

Yes.  The 14 year old macro has acknowledged faults, the new one doesn't
as far as anybody yet knows (although it has an area of controversy).

> Have you actually tried it yourself? E.g. to rewrite some code 
> conversion logic that you urge to replace?

No.  It is not yet working.

> > [ .... ]

> >>> That's not the way things happened.  pcase was simply installed in
> >>> Emacs, with all its faults, and then proliferated round Emacs.  Where
> >>> was the room for discussion?  Discussion is difficult after something
> >>> has already been done.

> >> We're doing it all the time by commenting on commits in an email to
> >> emacs-devel.

> > To have been effective, such comment would have resulted in the removal
> > or fundamental alteration of pcase long after it had been ground into the
> > core of Emacs.  That just wasn't going to happen.

> > You weren't there at the time.  I was.  I was completely unaware of pcase
> > happening, and it was a shock being confronted by it for the first time.

> If you weren't aware, then you weren't working on that area of code, right?

I was not.  pcase was first committed on 2010-08-04 in commit
d02c9bcd096c44b4e3d5e2834c75967b56cdecdd.  There was no prior discussion
about it on emacs-devel.

> >>> If you're trying to say that pcase is better than nothing, so people use
> >>> it, then I'd agree.  But if you're trying to insist it's as good as it
> >>> could be,

> >> One does not need to insist on that to disagree with your original
> >> statements.

> > You cannot disagree with my original statement made last night.  As I
> > said, you weren't there at the time.

> I don't have to insist it's as good as it could be to object to throwing 
> it out.

Your wish has been fulfilled.  Eli's and Stefan K's decision from last
night is 100% in favour of those who want the use of pcase to carry on
unchanged.  cond* has been consigned to a few niche uses before it is
even up and running.

> >>> I'd ask you why Richard is spending a lot of time crafting a
> >>> better replacement.

> >> Rewriting other people's code that one doesn't understand has a long and
> >> varied history in software development. We even have a term for it.

> > You're suggesting in that paragraph that the fault lies in Richard's lack
> > of ability.  That's uncalled for.  He has trouble reading and
> > understanding code written with pcase, as do I, and as do others here.
> > The fault is in pcase; it is flawed.  At the same time, it is not doubted
> > that there are people here fully conversant with pcase.  Having such a
> > split in the project is a bad thing.

> Having trouble with doing something is the literal definition of lack of 
> ability.

"Lack of ability" means a general inability to get things done, unless
qualified somehow.  (English is my first language.)  The fault lies in
pcase's unreadable syntax.  It is not personal.

> Not the lack of talent, mind you, or potential, but insufficient 
> understanding and skill with that tool (destructuring pattern 
> matching--which is not unique to Elisp and has carryover from a number 
> of other programming languages) is what motivated this whole argument.

Unlike most of Emacs Lisp, pcase is peculiar in that only some hackers
can get to grips with it.  You seems to be one of them, I am certainly
not, and neither is Richard.  The decision recently taken will mean you
need not trouble yourself with cond*, and people like me will continue to
be hindered and slowed down by pcase code for the foreseeable future.

> And I'm really skeptical that when cond* goes through all the additional 
> revisions and gets as powerful as pcase, that it won't raise all the 
> similar questions.

Possibly, but not inevitably.  Its syntax is kinder on the eye than
pcase's.  Maybe people would object to it because it requires the use of
multicharacter keywords and is bulkier, and so on.  I can't tell at this
stage.

> But I guess we shall see.

I doubt we will.  My proposal to test cond* by putting it into
macroexp.el was vetoed by Eli.  The decision taken was not to replace any
pcase with cond*.  Where does that leave cond*?

-- 
Alan Mackenzie (Nuremberg, Germany).



  reply	other threads:[~2024-01-28 19:14 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-27 21:36 Installing cond* in core Stefan Kangas
2024-01-27 23:33 ` Alan Mackenzie
2024-01-28  0:26   ` Stefan Kangas
2024-01-28  2:43     ` Po Lu
2024-01-28  6:46       ` Eli Zaretskii
2024-01-28  7:21         ` Po Lu
2024-01-28  7:32           ` Eli Zaretskii
2024-01-28  6:14     ` Eli Zaretskii
2024-01-28 15:58     ` Alan Mackenzie
2024-01-28  6:09   ` Eli Zaretskii
2024-01-28 12:38     ` Alan Mackenzie
2024-01-28 13:02       ` Dmitry Gutov
2024-01-28 13:38         ` Alan Mackenzie
2024-01-28 13:48           ` Dmitry Gutov
2024-01-28 14:32             ` Alan Mackenzie
2024-01-28 16:54               ` Dmitry Gutov
2024-01-28 19:14                 ` Alan Mackenzie [this message]
2024-01-28 19:26                   ` Eli Zaretskii
2024-01-28 20:43                   ` Dmitry Gutov
2024-01-30  3:56                 ` Richard Stallman
2024-01-28 13:19       ` Emanuel Berg
2024-01-28 14:18       ` Eli Zaretskii
2024-01-28 15:26         ` Alan Mackenzie
2024-01-28 15:40           ` Eli Zaretskii
2024-01-30  3:57             ` Richard Stallman
2024-01-28  4:28 ` Stefan Monnier via Emacs development discussions.
2024-01-30  3:58   ` Richard Stallman
2024-01-30 14:33     ` Stefan Monnier
2024-02-02  3:39       ` Richard Stallman
2024-02-02 13:17         ` Stefan Monnier
2024-02-02 15:24           ` Alan Mackenzie
2024-02-02 18:50             ` Stefan Monnier
2024-02-04  4:47               ` Richard Stallman
2024-02-04 14:12                 ` Stefan Monnier
2024-02-06  3:49                   ` Richard Stallman
2024-02-05  3:33           ` Richard Stallman
2024-02-05 12:39             ` Stefan Monnier
2024-03-13  2:27               ` Richard Stallman
2024-03-13  3:05                 ` Stefan Monnier
2024-03-16  1:45                   ` Richard Stallman
2024-03-16 16:15                     ` Stefan Monnier
2024-03-18  2:42                       ` Richard Stallman
2024-03-18  3:06                         ` Stefan Monnier
2024-03-19  9:19                           ` Peter Hull
2024-03-20 22:40                           ` Richard Stallman
2024-03-20 22:54                             ` Stefan Monnier
2024-01-28 14:28 ` Emanuel Berg
2024-01-30  3:58 ` Richard Stallman
2024-01-30 13:04   ` Eli Zaretskii
2024-03-16 20:53 ` Lynn Winebarger
2024-03-18  2:41   ` Richard Stallman
2024-03-19 19:48     ` Lynn Winebarger

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=ZbanfmJ8nM8FK1dQ@ACM \
    --to=acm@muc.de \
    --cc=dmitry@gutov.dev \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=stefankangas@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).