Hi Edwin,

> > I'm not so sure I would've used it much though if I had know about the (id)
> > function from the start: http://software-lab.de/doc/refI.html#id
> 
> i'd like to understand this more. can you please give an illustration
> on how to do this?

Sorry, this is my fault. The reference gives no explanation what 'id' is
for.

It assumes some understanding on how objects are stored in databases.
Each object is stored in a file, at a given block-offset. That offset
never changes during the lifetime of an object. It is used to fetch that
object's data from the file, and write changes to the file.

This can be seen also in an external symbol's name: If it resides in
block number 7 of file number 3, it will print as '{3-7}' on 32-bits and
'{B7}' on 64-bits (the two systems differ here).

Now what 'id' does is return such a symbol's file number and offset, or
do the opposite operation (returning that symbol if given a block offset
and a file number). As these numbers are a unique reference to that
symbol, they are useful in some contexts, e.g. when communicating an
object to the external world (e.g. a module written in another
language). Within a single database, or also distributed databases, 'id'
is not necessary as the symbol can be directly communicated.

Perhaps Henrik can give a use case example?

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to