guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: still is obscure to me ...


From: Martin Grabmueller
Subject: Re: still is obscure to me ...
Date: Tue, 05 Jun 2001 18:04:36 +0200

> From: David Pirotte <address@hidden>
> Date: Tue, 05 Jun 2001 12:59:32 +0200
> 
> can I expect that the following code WILL produce a NEW defclass-form
> at every dbu/build-db-class-1 evaluation ?
> 
> if not, what should be a 'good' code ?
> 
> (define (dbu/build-db-class-1 class-name slot-defs slot-idts)
>   (let ((defclass-form (eval `(define-class ,class-name () ,@slot-defs)))
>       (export-form (eval `(export ,class-name ,@slot-idts))))
>     defclass-form
>     export-form
>     ))

What are you trying to do here? I suspect you want to write a macro
which does define a class and export it as well as its accessors.
What about something like this:

(define-macro (dbu/build-db-class-1 class-name slot-defs slot-idts)
  `(begin
     (define-class ,class-name () ,@slot-defs)
     (export class-name ,@slot-idts)))

HTH,
  'martin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]