[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Slot accessing issues in EIEIO
From: |
Zhu Zihao |
Subject: |
Re: Slot accessing issues in EIEIO |
Date: |
Thu, 07 May 2020 11:20:49 +0800 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Gojō) APEL/10.8 EasyPG/1.0.0 Emacs/27.0 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
On Thu, 07 May 2020 05:58:11 +0800,
Stefan Monnier wrote:
>
> > OK, a closql-object (This is a class defined in closql) is a proxy object
> > to a
> > row in SQL database. So each time user tries to read a slot, closql must
> > sync
> > values between database and Emacs first.
>
> OK, I'm starting to see vaguely what this is about, but it's still
> rather fuzzy. 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?
>
>
> Stefan
slot-missing just work, but I don't think it gets things done right.
If we use slot-missing. We have to manage the column names manually instead of
present them in slots. We should keep the proxy object doesn't have any
slot to make slot-missing work, or your slot name may collide with SQL column
name.
Thus, we have to give up the direct way to describe the structure of SQL
database. We can't use defclass and slots definition now because we wanna use
slot-missing. If I create another type of proxy object(e.g. will log to some
file
when accessing a slot), I have to repeat the pattern I mentioned above. It's
harmful for reusability.
- Slot accessing issues in EIEIO, Zhu Zihao, 2020/05/06
- Re: Slot accessing issues in EIEIO, Stefan Monnier, 2020/05/06
- Re: Slot accessing issues in EIEIO, Zhu Zihao, 2020/05/06
- Re: Slot accessing issues in EIEIO, Stefan Monnier, 2020/05/06
- Re: Slot accessing issues in EIEIO,
Zhu Zihao <=
- Re: Slot accessing issues in EIEIO, Stefan Monnier, 2020/05/06
- Re: Slot accessing issues in EIEIO, Zhu Zihao, 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, 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