emacs-devel
[Top][All Lists]
Advanced

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

Re: master 78fc49407b8 1/3: Improve filling of ChangeLog entries


From: João Távora
Subject: Re: master 78fc49407b8 1/3: Improve filling of ChangeLog entries
Date: Wed, 31 Jan 2024 10:28:31 +0000

On Wed, Jan 31, 2024 at 6:44 AM Po Lu <luangruo@yahoo.com> wrote:
>
> João Távora <joaotavora@gmail.com> writes:
>
> > Seems like this much simpler patch would have done the job.  If cl-loop
> > is so toxic, even macroexpanding these trivial ones away yields much
> > less code and much simpler code.  Tests are a welcome addition though.
>
> I did not understand the code using cl-loop,

Neither did I.  Not because of cl-loop, of course, but because of
the new problem domain.  But a few runs of edebug quickly clarified,
even before finding all those nice tests.

I think you're too obsessed with cl-loop. pp-macroexpand-last-sexp
would have also have told you how trivial the loops were.  You could
still have rewritten things with plain 'while' and still have it
be significantly shorter.

> and there are no comments in this version of the change.

Concise code not spanning multiple screenfuls doesn't need all those
profuse comments either.  A little commenting is fine (maybe a comment
explaining the sum of lengths) but the multiple screenfuls and
the level of verbosity you picked here makes a relatively easy problem
domain seem esoteric and super-complex, when in reality it isn't.

In my experience, once a function reaches this hairiness, it rarely
contracts.  All you'll see if more if-branches appear at the leaves.

> For that matter, if there _were_
> comments in the original version, I could have understood its intent,
> but cryptic cl-lib and pcase labyrinths are all the rage these days.

loop isn't fashion, it's probably older than you are, and not the beast you
make of it, especially these trivial cases.  I'm pretty sure you'd be able
to grok it in less than 5 minutes.

The pcase you substituted was even more trivial (really, "labyrith"??  how
extreme can you get?) Personally I wouldn't have added it, but of course
I wouldn't have removed it for no reason.  It's a hard sell that so much
of this doesn't spring from the ridiculous polarized trenches people
have been digging themselves into in this list.  This seems to me the
saddest part.

Honestly, Po, at the end of the day, we should all be happy you're fixing
bugs and adding unit tests.  You've got exceptional energy or exceptional
free time, or both.  I think freedoms should be given liberally to people
doing this work, including of course "rewriting the whole damn thing" (tm).
And of course you should have your own pick of the programming style.

Personally, I just wish you'd appreciate that high-level languages aren't
the bogey man.  That others might be put off by long listings (maybe even
future you, who knows?).  That rewrites spawn bugs, too (as your multiple
subsequent commits  show). That sometimes this:

-                  (beg (progn (goto-char beg) (line-beginning-position))))
+                  (beg (progn (goto-char beg) (skip-chars-backward "^
\n") (point))))

could be preferable to going medieval on a function's ass

> Anyway, please don't modify log-edit just yet--I plan to modify it to
> handle conditional changes and part indicators.

I won't, of course.  I'll leave it to you.

Also I'll be leaving emacs development soon, so you'll be able to
butcher Eglot's cl-loops and pcases and macros into whatever you see fit,
just try not to go too medieval on its ass.

João



reply via email to

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