Gnus development mailing list
 help / color / mirror / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: ding@gnus.org, emacs-devel@gnu.org
Subject: Re: Gnus work
Date: Thu, 05 Oct 2017 15:31:35 +0200	[thread overview]
Message-ID: <87h8vdu3ew.fsf@mouse.gnus.org> (raw)
In-Reply-To: <87vajudasc.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Wed, 04 Oct 2017 11:32:03 -0700")

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> 1. Replace Gnus' homemade mechanisms with equivalent mechanisms that
>    have since appeared in core (in many cases Gnus had them first).

Sounds good.  The backend interface is particularly grungy and could to
with a complete rewrite.  Since there are probably extremely few
out-of-tree backends these days, I think you can massacre the interface
with impunity without thinking about compatibility.

> 2. Add docstrings and comments to minimize bug-hunter bewilderment.

Sounds good.

> 3. Look at unpicking functions so that there's a clearer demarcation
>    between code that does server logic (marks and whatnot) and code that
>    does UX/presentation stuff.

There's a lot of long functions in Gnus, but there's also a reason for
many of them being that way.  The first is that when setting up modes
and stuff, there's a lot of things that just have to be, er, set up.
Replacing a long litany of stuff like

(setq truncate-lines t
      mode-line-format foo)

with

(gnus-set-truncate-lines-to-t)
(gnus-set-mode-line-format foo)

isn't that much clearer.  :-)

(I'm just kidding, but that's kinda the Unclean Bob style of
refactoring).

The other consideration is that Emacs Lisp is really slow.  Splitting
central functions into many component functions will make Gnus even
slower than it already is.  And Gnus is slow.

> 5. Reduce number of dynamic variables, to cut back on "spooky action at
>    a distance". To be honest I don't even know where to start here.

Good luck, but Gnus has a gazillion settings that modify its workings in
many, many ways, and they're all done by variables.  Trimming down that
overload of settings would be nice, but every time I've tried, there's
always somebody that relied on just that single thing you'd think that
nobody would be weird enough to actually use.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



  parent reply	other threads:[~2017-10-05 13:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-04 18:32 Eric Abrahamsen
2017-10-04 18:43 ` Emanuel Berg
2017-10-04 18:53   ` Eric Abrahamsen
2017-10-04 21:07     ` Emanuel Berg
2017-10-04 21:09 ` Tim Landscheidt
2017-10-04 21:56   ` Eric Abrahamsen
2017-10-05  5:19     ` Adam Sjøgren
2017-10-05 17:35       ` Eric Abrahamsen
2017-10-05 17:51         ` Adam Sjøgren
2017-10-05 20:10           ` Eric Abrahamsen
2017-10-05 16:37     ` Sivaram Neelakantan
2017-10-05  6:53 ` Julien Danjou
2017-10-05 13:31 ` Lars Ingebrigtsen [this message]
2017-10-05 18:12   ` Eric Abrahamsen

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=87h8vdu3ew.fsf@mouse.gnus.org \
    --to=larsi@gnus.org \
    --cc=ding@gnus.org \
    --cc=emacs-devel@gnu.org \
    --cc=eric@ericabrahamsen.net \
    /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.
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 NNTP newsgroup(s).