chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] How to instantiate a Meroon object by class name.


From: Ed Watkeys
Subject: Re: [Chicken-users] How to instantiate a Meroon object by class name.
Date: Thu, 18 Aug 2005 11:12:54 -0400 (EDT)
User-agent: SquirrelMail/1.4.4

Benedikt Rosenau said:
> On Thu, Aug 18, 2005 at 10:28:44AM -0400, Ed Watkeys wrote:
>
> Mmm, eval at runtime. Is there no way to do this by lazy evaluation, i.e.
> promises (delay)?

Well here's my macro:

(define-macro (make-instance class . rest)
  `(instantiate ,(eval class) ,@rest))

That eval occurs at compile-time, correct?

(macroexpand-1 '(make-instance 'Foo)) => (instantiate Foo)

Regards,
Ed


-- 
Transmogrify, LLC * <http://xmog.com>





reply via email to

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