[Top][All Lists]

[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: Wed, 17 Jul 2019 15:08:47 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> 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.

Very good to know! I was originally wavering between eieio objects and
structs, and didn't have a very compelling reason to end up with
objects, except I thought we could "probably use" the extra
functionality at some point. But speed is most definitely a concern, and
totally outweighs any hypothetical future usefulness of objects. I'll go
with structs.


reply via email to

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