http://axisofeval.blogspot.com/search?u ... results=23
a question about the today existence of CAR and CDR functions on new lisp dialects. This have bring to me a consideration on my dialect. I try to expose to you my dilemma.
My system define structures like packages, funtions, structures, types in an anonymous way. A type can be created in this manner:
Code: Select all
(define types:2d-point (type nil :x :y)) ---> #<type |2d-point| (x y)>
Code: Select all
(struct types:2d-point :x 0 :y 0) ---> #S(2d-point x 0 y 0)
In the following instruction, the type have no name, because is not registered into TYPES:
Code: Select all
(struct (type nil :x :y) :x 0 :y 0) ---> #S(#16:00E49E88 x 0 y 0)
Ok ?? GOOOOD!!!
So ... reading that link, where the author say to use structures for CONSES .. make me thinking that CAR and CDR can be fields of a structure, and so name and nicknames of types or packages can be fields of a structure too.
Then if I wanna know the name of a type I probably wanna write something like this:
Code: Select all
(get :type X) ---> types:my-type
Code: Select all
(define types:my-type (type nil :type :x :y))
(define x (struct types:my-type :type "XY" :x 0 :y 0))
(get :type x) --- ????
The goal is to remove functions like
- name-of
nicknames-of
imaginary-of
real-of
sign
packages-of
car
cdr
set-car
set-cdr
size-of
type-of
How can I resolve this problem?
Thank you.