Is there a way to create new primitive types in Gambit? I'm using 3.0 but I'm interested in answers regarding either version.
My simple object system builds 'objects' out of procedures with local state. E.g.:
(let ((x 10) (y 20)) (lambda args ...))
The (classic?) problem here is that my 'objects' don't look different from procedures. If I know that I'm dealing with one of my objects, I can ask it what it it is. But if I'm dealing with something that can be any Scheme type, I can ask if it's a procedure, but then I can't tell if it's one of my objects or a proc...
I need a way to have a 'new' procedure type. A type of primitive item that acts just like a procedure but answers #f to the 'procedure?' predicate.
I guess I am abusing procedures with this style of object system. But I'm hacking so it's OK. ;-)
Ed