emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sqlite3


From: Qiantan Hong
Subject: Re: sqlite3
Date: Thu, 16 Dec 2021 05:06:52 +0000

Persistent variable is being used to refer to different thing,
and have certainly caused confusion in the discussion.
I’m consistent in my terminology, at least, and I will try to
distinguish here precisely:

I now distinguish the following 3 things by their interface for
accessing the data:
persistent store (PS), Lars’ multisession variable (LMV),
and Qiantan’s persistent variable (QPV):
(Each of them also have an interface for defining the
storage/variable, but is not very different in that aspect)

PS: is a generalized variable of the form
(store-get KEY STORE)

LMV: is a generalized variable of the form 
(multisession-value MULTISESSION-OBJ)

QPV: is a generalized variable of the form
VAR (aka, at the place of usage, is no different from an
ordinary variable)

In terms of expressivity:

PS cannot be simulated with LMV or QPV.

LMV can be simulated with PS
(defun multisession-value (obj)
   (store-get obj global-store))
(plus a similar definition for setf)

LMV can be simulated with QPV
(defun multisession-value (obj)
   (symbol-value obj))

QPV can be implemented with PS,
but fairly non trivially (and it is how I implement it)
QPV cannot be simulated with LMV.

Finally, my comments: LMV is closer to PS and could be viewed
as a specialization of PS. QPV is different from the other two,
and its major feature is that one could make a variable persistent
without needing to change any code already using that variable
(i.e. QPV interface is transparent).


Best,
Qiantan


reply via email to

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