unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: emacs-devel@gnu.org
Subject: Re: Documentation of nnoo.el
Date: Sun, 12 Jul 2015 20:05:30 +0200	[thread overview]
Message-ID: <m34ml9nted.fsf@gnus.org> (raw)
In-Reply-To: <87k2u66nvx.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sun, 12 Jul 2015 11:44:18 +0800")

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> nnoo.el is basically just an object-oriented system replicated with pure
> functions. deffoo creates methods, defvoo creates slots. `nnoo-declare'
> is kind of the equivalent of `defclass'. `nnoo-change-server' is the
> main function for switching servers: it copies the defvoo slot values
> for a single server into the respective global variables.

Yup.  It was written that way (back in...  what?  94?) because there was
some resistance to altering the "interface" defined by previous Gnus
backends.  (See nnnil.el for a basic summary of what that is.)  By
having Gnus switch around variables behind the backends' backs, the
"interface" was preserved while Gnus could go on having multiple servers
of the same type, etc.

I don't know whether that was a good trade-off (keeping the interface
vs. introducing lots of magic), but if I were to write that stuff now, I
wouldn't do it that way.  :-)  I'd pass in explicit object describing
the server state to each backend function, and I wouldn't have any
"global" voo variables at all.

If anybody wants to rewrite all the backends that way -- please go ahead.

> 1. First, only make backends into classes. This would give us the chance
>    to do away with the select-method/secondary-select-method
>    distinction, and just have a list of defined servers.

I think that's a totally orthogonal issue.  We could do that now, but
it'd break the current naming scheme for the groups in Gnus.

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



  parent reply	other threads:[~2015-07-12 18:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-09 15:01 Documentation of nnoo.el Stefan Monnier
2015-07-12  1:32 ` Eric Abrahamsen
2015-07-12  2:25   ` Stefan Monnier
2015-07-12  3:44     ` Eric Abrahamsen
2015-07-12 11:17       ` Rasmus
2015-07-12 12:15         ` Eric Abrahamsen
2015-07-12 18:05       ` Lars Magne Ingebrigtsen [this message]
2015-07-13  2:56         ` Eric Abrahamsen
2015-12-24 16:59           ` Lars Ingebrigtsen
2015-12-25  3:44             ` Eric Abrahamsen
2015-12-26 22:11               ` Lars Ingebrigtsen
2015-12-27  1:03                 ` Eric Abrahamsen
2015-12-27  6:03                   ` Lars Ingebrigtsen
2015-07-12 17:55 ` Lars Magne Ingebrigtsen
2015-07-12 18:22   ` Nikolaus Rath

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=m34ml9nted.fsf@gnus.org \
    --to=larsi@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.
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).