Problem with : operator and macros

For the Compleat Fan
Locked
Jeff
Posts: 604
Joined: Sat Apr 07, 2007 2:23 pm
Location: Ohio
Contact:

Problem with : operator and macros

Post by Jeff »

Lutz,

The : operator is evaluating symbols in the arguments list:

Code: Select all

(new Class 'Test)
(define-macro (Test:foo self)
  (println (args)))
(set 'test (Test))
(:foo test these should not evaluate) ; => (nil nil not <9D20> nil)
Jeff
=====
Old programmers don't die. They just parse on...

Artful code

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

Yes, this doesn't allow macros. This will change in the next version. So at the moment there is no polymorph application for macros. You would have to call Test:foo explicitly.

Lutz

Locked