emacs-devel
[Top][All Lists]
Advanced

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

Re: Turning Gnus groups into real objects


From: Eric Abrahamsen
Subject: Re: Turning Gnus groups into real objects
Date: Fri, 19 Jul 2019 16:56:57 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> (defclass gnus-server ()
>>   ((address :type string)
>>   ...))
>>
>> (defclass gnus-nnimap (gnus-server)
>>   ((capabilities
>>     :type string)
>>    (newlinep
>>     :type boolean)
>>    ...))
>
> Aka
>
>     (cl-defstruct (gnus-server)
>       (address nil :type string))
>
>     (cl-defstruct (gnus-nnimap
>                    (:include gnus-server))
>       (capabilities nil :type string)
>       (newlinep     nil :type boolean))
>
>> (cl-defmethod gnus-request-list ((server gnus-nnimap))

Aw... I was also considering a bit of (tastefully designed) multiple
inheritance.

> BTW, I was wondering whether we could preserve backward compatiblity with
> defvoo and defffoo.  But I guess for `defvoo`, we'd need the equivalent
> of `define-symbol-macro` whereas we currently only have `cl-symbol-macrolet`.

That would be an interesting thing to have for many reasons. But here it
seems like it would mainly be useful to support backends defined outside
of Gnus, in which case we'd also have to cover `nnoo-declare' and
friends, and... yuck.




reply via email to

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