From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-devel@gnu.org
Subject: Re: Turning Gnus groups into real objects
Date: Wed, 17 Jul 2019 15:08:47 -0700 [thread overview]
Message-ID: <877e8g5n68.fsf@ericabrahamsen.net> (raw)
In-Reply-To: jwvwogg49hd.fsf-monnier+emacs@gnu.org
Stefan Monnier <monnier@iro.umontreal.ca> 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.
Thanks,
Eric
next prev parent reply other threads:[~2019-07-17 22:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-17 19:29 Turning Gnus groups into real objects Eric Abrahamsen
2019-07-17 21:33 ` Andy Moreton
2019-07-17 22:04 ` Eric Abrahamsen
2019-07-17 21:59 ` Stefan Monnier
2019-07-17 22:08 ` Eric Abrahamsen [this message]
2019-07-18 11:59 ` Lars Ingebrigtsen
2019-07-18 18:01 ` Eric Abrahamsen
2019-07-19 12:56 ` Lars Ingebrigtsen
2019-07-19 18:47 ` Eric Abrahamsen
2019-07-19 22:10 ` Stefan Monnier
2019-07-19 23:56 ` Eric Abrahamsen
2019-07-20 12:52 ` Lars Ingebrigtsen
2019-07-21 1:41 ` Eric Abrahamsen
2019-07-21 12:34 ` Barry Fishman
2019-07-22 17:14 ` Eric Abrahamsen
2019-07-21 13:40 ` Stefan Monnier
2019-07-22 16:38 ` Eric Abrahamsen
2019-07-21 14:02 ` Lars Ingebrigtsen
2019-07-22 16:26 ` Eric Abrahamsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877e8g5n68.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=emacs-devel@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.