[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Slot accessing issues in EIEIO
From: |
Stefan Monnier |
Subject: |
Re: Slot accessing issues in EIEIO |
Date: |
Thu, 07 May 2020 22:09:58 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
>> To better understand, I suggest that I'll throw some solutions so you
>> can shoot them down explaining why they're not applicable.
>> Would it work to use the `slot-missing` generic function?
> I think the above addresses that. But I guess the questions becomes
> "Well, what about `slot-unbound' then?".
Here's another solution instead of the pair-of-objects solution:
For each slot, use two different slot names:
- one for the "virtual slot" corresponding to a data base column.
- one for the "real slot" that caches the value from the database.
So when `slot-value` accesses a virtual slot, you get to `slot-unbound`
which can then lookup (and fill if needed) the corresponding real slot
(whose name can presumably be obtained by adding or removing some
prefix/suffix).
Stefan
- Re: Slot accessing issues in EIEIO, (continued)
- Re: Slot accessing issues in EIEIO, Jonas Bernoulli, 2020/05/07
- Re: Slot accessing issues in EIEIO, Stefan Monnier, 2020/05/07
- Re: Slot accessing issues in EIEIO, Zhu Zihao, 2020/05/07
- Re: Slot accessing issues in EIEIO, Stefan Monnier, 2020/05/07
- Re: Slot accessing issues in EIEIO, Zhu Zihao, 2020/05/08
- Re: Slot accessing issues in EIEIO, Stefan Monnier, 2020/05/08
- Re: Slot accessing issues in EIEIO, Zhu Zihao, 2020/05/07
- Re: Slot accessing issues in EIEIO, Stefan Monnier, 2020/05/07
- Re: Slot accessing issues in EIEIO, Jonas Bernoulli, 2020/05/07
- Re: Slot accessing issues in EIEIO, Jonas Bernoulli, 2020/05/07
- Re: Slot accessing issues in EIEIO,
Stefan Monnier <=
Re: Slot accessing issues in EIEIO, Jonas Bernoulli, 2020/05/06
Re: Slot accessing issues in EIEIO, Jonas Bernoulli, 2020/05/06