Hi List,
maybe a rather newbie question, but I wonder if it is possible to
1. get a nested list representation of an object or class?
2. to turn a nested list that resembles the 'nested list representation an
object or class' into a new object (or class) without using PicoLisp's
#+begin_src picolisp
(new ...)
(class ...)
#+end_src
functions, i.e. without extracting the internals of the list and assigning
them one-by-one as instance or class variables, but rather by somehow
telling PicoLisp that "this whole thing (nested list) represents an
object or class"?
I would imagine something like:
#+begin_src picolisp
# object as nested list:
# (<<value-cell-content>> <<property-list>>)
# that is
(class-name-as-symbol ((key1 . value1) (key2 . value2) ... (keyN . valueN)))
# for example
(dog
((race . "border collie")
(size . "medium")
(intelligence . "high")
(shepard) ) )
#+end_src
In my special use case, there would be no list of classes, just a single class
given as symbol for each object (yet a lower-case symbol without + prefix).
Can I tell PicoLisp directly that such a list represents an object (assuming
class +Dog is defined and 'dog' is an alias for it) without doing
#+begin_src picolisp
(new ’(+Dog) "border collie" "medium" "high" T)
#+end_src
explicitly?
--
cheers,
Thorsten
--
UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe