emacs-devel
[Top][All Lists]
Advanced

[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: Wed, 06 May 2020 22:28:20 +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 Wed, 06 May 2020 21:28:18 +0800,
Stefan Monnier wrote:
> 
> > Recently, I'm reading the source of
> > closql(https://github.com/emacscollective/closql), A Emacs sqlite database 
> > ORM
> > package. It use eieio object, and put a piece of advice on eieio-oref to
> > intercept the reading slot action.
> 
> Yuck!  Can you explain why they need an advice on `eieio-oref`?
> 
> 
>         Stefan

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.

It's also possible to reinvent accessors for closql specific usage, but Jonas
doesn't do. I guess this way(hack on EIEIO) can reuse some facilities(like 
with-slots).




reply via email to

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