[Top][All Lists]

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

Re: persistent lisp objects

From: Thierry Volpiatto
Subject: Re: persistent lisp objects
Date: Sun, 25 Oct 2009 11:26:50 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> I have no idea what he thinks as novel, but such functions have been
> available for ages.  Called print and read.

There is nothing new.
I just show a feature of the CL version of `eval-when-compile'.
Thus since we have a new representation of hash-table in emacs-cvs, this
allow to save hash-tables to a compiled file.
But other lisp objects (e.g lists) can be saved in the same way in
inferior emacs versions.
I just provide a basic function to demonstrate this feature.(see
precedent posts)
The emacs manual say that about eval-when-compile:

|  -- Special Form: eval-when-compile forms...
|      The FORMS are evaluated at compile-time; at execution time, this
|      form acts like a quoted constant of the resulting value.  Used at
|      top-level, `eval-when-compile' is just like `eval-when (compile
|      eval)'.  In other contexts, `eval-when-compile' allows code to be
|      evaluated once at compile-time for efficiency or other reasons.
|      This form is similar to the `#.' syntax of true Common Lisp.

Please read that about the `#.' feature of CL:


That is surely not the best way to serialize objects, but that is better
than nothing until somebody write something to save hash-table, lists,
etc... in a data base.

A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France

reply via email to

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