all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Po Lu <luangruo@yahoo.com>
Cc: Dmitry Gutov <dmitry@gutov.dev>, emacs-devel@gnu.org
Subject: Re: master 78fc49407b8 1/3: Improve filling of ChangeLog entries
Date: Wed, 31 Jan 2024 10:28:31 +0000	[thread overview]
Message-ID: <CALDnm51o0hOwsp-4ca9OXYtE3vcJwuedkQixfKwVyy-bQV0a9Q@mail.gmail.com> (raw)
In-Reply-To: <87a5omf1e8.fsf@yahoo.com>

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	other threads:[~2024-01-31 10:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <170643232559.30479.16631610453249222615@vcs2.savannah.gnu.org>
     [not found] ` <20240128085846.187A2C1DAE4@vcs2.savannah.gnu.org>
2024-01-28 13:22   ` master 78fc49407b8 1/3: Improve filling of ChangeLog entries Dmitry Gutov
2024-01-28 13:37     ` Po Lu
2024-01-30 22:07     ` João Távora
2024-01-31  6:43       ` Po Lu
2024-01-31 10:28         ` João Távora [this message]
2024-01-31 11:19           ` Po Lu
2024-01-31 13:22             ` João Távora
2024-01-31 14:01               ` Po Lu
2024-01-31 14:30                 ` João Távora
2024-01-31 15:15                 ` Dmitry Gutov
2024-01-31 15:32                   ` Alan Mackenzie
2024-01-31 16:46                     ` João Távora
2024-01-31 18:29                       ` Alan Mackenzie
2024-01-31 17:05                     ` Dmitry Gutov
2024-01-31 18:45                       ` Alan Mackenzie
2024-01-31 20:39                         ` Dmitry Gutov
2024-01-29 20:13   ` Stefan Kangas
2024-01-30  1:26     ` Po Lu

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALDnm51o0hOwsp-4ca9OXYtE3vcJwuedkQixfKwVyy-bQV0a9Q@mail.gmail.com \
    --to=joaotavora@gmail.com \
    --cc=dmitry@gutov.dev \
    --cc=emacs-devel@gnu.org \
    --cc=luangruo@yahoo.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.