From: Eric Ludlam <eric@siege-engine.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Emacs Development <emacs-devel@gnu.org>
Subject: Re: eieio-base patch to support EDE project loading
Date: Sun, 6 Oct 2019 08:18:08 -0400 [thread overview]
Message-ID: <13d0ce18-013c-94b7-ea2e-bef5a6687bb4@siege-engine.com> (raw)
In-Reply-To: <jwvzhig1c3g.fsf-monnier+emacs@gnu.org>
On 10/4/19 4:45 PM, Stefan Monnier wrote:
>> Without that list of superclasses, `child-of-class-p' fails. Since having
>> the superclass list in autoloads is a non-starter, this patch will
>> un-autoload classes found in the file being read before the call to
>> `child-of-class-p'.
>
> Looks good, but I felt like those un-autoloads scattered around felt
> a bit haphazard (with tests slightly different each time), so I suggest
> the patch below instead, WDYT (which also moves the un-autoload to
> child-of-class-p so it applies not just to
> eieio-persistent-validate/fix-slot-value but to all users of
> child-of-class-p).
Patch looks like a good idea to me. I was worried about overhead of
always checking and un-autoloading, but this patch seems to deal with
that nicely.
The original problem arose when trying to identify the class parents.
Perhaps using eieio--full-class-object in eieio-class-parents would cast
a slightly wider net?
>
>> It would be better to store the superclasses in the autoload declaration so
>> that extensible class hierarchies can be more dynamically loaded without
>> internal checks with un-autoload, but I don't know enough about how the new
>> version of eieio works to provide that patch.
>
> It would allow child-of-class-p to be computed without loading the
> class, hence a bit more laziness, but I'm wondering how often it would
> make a real difference: how likely are you to use child-of-class-p
> without either already having an instance of that class or being right
> about to build such an instance?
I agree. The patch solves the problem in a more pragmatic way.
> Can you test the patch below before I push it?
It works great. Thanks for looking into it!
Eric
next prev parent reply other threads:[~2019-10-06 12:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-01 2:18 eieio-base patch to support EDE project loading Eric Ludlam
2019-10-01 12:14 ` Stefan Monnier
2019-10-04 20:45 ` Stefan Monnier
2019-10-06 12:18 ` Eric Ludlam [this message]
2019-10-06 20:02 ` Stefan Monnier
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=13d0ce18-013c-94b7-ea2e-bef5a6687bb4@siege-engine.com \
--to=eric@siege-engine.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.