summaryrefslogtreecommitdiffstats
path: root/2020/info/32.md
blob: ad063ad97d94856fe16477584aa893b211e19c6a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Object Oriented Code in the Gnus Newsreader
Eric Abrahamsen

[[!template id=vid src="https://mirror.csclub.uwaterloo.ca/emacsconf/2020/emacsconf-2020--32-object-oriented-code-in-the-gnus-newsreader--eric-abrahamsen.webm"]] 
[Download compressed .webm video (43.9M)](https://media.emacsconf.org/2020/emacsconf-2020--32-object-oriented-code-in-the-gnus-newsreader--eric-abrahamsen--compressed32.webm)  
[Download compressed .webm video (21.3M, highly compressed)](https://mirror.csclub.uwaterloo.ca/emacsconf/2020/smaller/emacsconf-2020--32-object-oriented-code-in-the-gnus-newsreader--eric-abrahamsen--vp9-q56-video-original-audio.webm)

The venerable Gnus newsreader has evolved over the years to interface
with many different types of news- or mail-like backend programs,
presenting all of them using a unified interface.  This sort of
software often calls for an object-oriented architecture, at least as
regards polymorphism, yet Gnus was written well before Emacs lisp
acquired the object-oriented tools and libraries – largely borrowed
from Common Lisp – that it boasts today.

Yet Gnus needed something "object-oriented-like", and so nnoo.el was
born: a rather amazing (and frankly terrifying) implementation of
object-oriented behavior using functional code.

This talk will be a brief introduction to how this existing system
works, and to the ongoing, incremental effort to port it over to newer
Elisp tools like generic functions, structs, and objects.

<!-- from the pad --->

# Questions

## Q3: Have you done any other projects using EIEIO and/or defstruct?
Right, EBDB is super deep into EIEIO, and was kind of written as a
project for learning it, and the new gnus-search library is a more
restrained usage. The search engines are defclasses, and much of the
code is shared, which works quite well.


## Q2: Is there may activity on maintenance of Gnus today? (and is Lars involved/aware of this work?)
Yes, there's still development going on. I don't think Lars is very
focused on Gnus right now, but I run all changes by him first. He
fixes bugs, but as far as I know, I'm the only one adding features
right now, which is a terrifying thought.

## Q1: How much of this 90's funny code :) can be replaced and how much will have to stay forever?
Eventually I think we can get most of it out of there. I was happy to
be able to replace obarrays-as-hashtables with real hashtables, though
that was a very painful process

# Notes
Famous last words: "Sometimes the only thing that's worse than not
knowing why something doesn't work is not knowing why it does work."