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: Stefan Monnier
Subject: Re: Turning Gnus groups into real objects
Date: Wed, 17 Jul 2019 17:59:12 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> I'd like to turn groups into real objects

I think that can make a fair bit of sense.

> using EIEIO.

But I have to warn you that EIEIO objects are pretty costly, i.e. slow
to construct (which goes through `make-instance`) and slow to access
their slots (which goes through `slot-value`).  Depending on your code's
structure it might not matter too much, or it might render the code
unacceptably slow.

If creation of those objects and/or access to their slots is expected to
be frequent enough to matter, you might be better off using
`cl-defstruct` instead, which is much more lightweight and will likely
serve you just as well here.


        Stefan




reply via email to

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