|
Hi all,
TXR 110 is out.
The project has moved away from SourceForge for hosting the binary downloads.
Binaries are available from the new Bintray.
There are some bugfixes in this release as well as exciting new TXR Lisp developments which innovate Lisp itself. Particularly noteworthy are the placelet/placelet*
macros which allow the programmer to create a lexically scoped symbolic alias for a assignment places. The expressions which denotes the aliased places are evaluated exactly once. The storage locations they denote can then be accessed/stored through the aliases multiple times.
Another new invention related to places are "place macros", which allow new places to be specified as macro expansions to existing place types. Say you have some function (get-frobosity foo)
which retrieves the frobosity attribute of some object foo. Suppose that a foo is really just a cons cell, and the frobosity is stored in the cdr:
(defun get-frobosity (foo) (cdr foo))
You can easily have it so that (set (frobosity foo) 42)
works, without the complexity of having to use defplace
. Simply assert that (frobosity whatever)
is a place alias for (cdr whatever)
, which is done like this:
(define-place-macro get-frobosity (obj) ^(cdr ,obj))
Now whenever a (get-frobosity whatever)
form appears in a context where it is used as a place, this special macro is expanded and it is converted to (cdr whatever)
. And that is already a place, so everything works.
Cheers ...
This message was posted to the following mailing lists: | ||||
---|---|---|---|---|
TXR Users Mailing list info | Nearby messages |
Kaz'z Mailing List Archives adminstered by Kaz | Lurker (version 2.3, substantialy hacked by Kaz). Icon artwork from VisualPharm. |