I've been digging down to really understand the symbol implementation in
Picolisp, since symbols are used for so many purposes within the language.
One surprising thing I learned last night is that (get ...) has a side
effect! It moves the key that was accessed to the head of the symbol
"tail". I assume this is a performance optimization to cause recently
accessed properties to "bubble up" to the front of the list in case they
are re-accessed soon.
A few questions:
1. I understand why (cdr) doesn't function on a symbol (semantically
it's not a pair) but I'm curious why (car) is allowed to work (returning
the VAL)?
2. Is there anyway within the REPL to inspect the tail structure of the
symbol directly? This is mostly from curiosity.
3. Again from curiosity, I'm wondering why the bytes of the name are
seemingly stored "backwards"? I'm assuming this also provides some
performance optimization.
-wilhelm
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe