Hi Marc, Yes, a non-hygienic solution would be my preferred choice. Thank you, Francois
Afficher les réponses par date
Francois,
Yes, a non-hygienic solution would be my preferred choice.
Then, what about the following (which would also eliminate the need for eval): (dboucher@Forman) (09:34:21) [personal] gsi Gambit Version 4.0 beta 11
(define-macro (defclass classname supername) (if (or (not (symbol? classname)) (not (symbol? supername))) (error "invalid arguments to defclass")) `(begin ;; ** INSERT Class registering stuff here ** (define-macro (,classname . expr) (let ((vars '((ContextClass ',classname) (ContextSuperClass ',supername)))) `(let ,vars ,@expr))))) (defclass Window Object) (Window (list ContextClass ContextSuperClass)) (Window Object)
Dominique -- The Scheme Way Project http://schemeway.sourceforge.net
participants (2)
-
Dominique Boucher -
Francois Magnan