This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Thu, 1 Feb 2007, Per Bothner wrote:
Kjetil S. Matheussen wrote: > Okay, I figured it might have been easy since it knows that foobar is a > macro.
Yes, but the relationship to foo is harder to discern. Besides, it's a more general problem:
(define (foo) (foobar))
(define-syntax foobar ...)
> > In any case, define-macro is *strongly* deprecated. Don't use it.
> > I should probably have it cause a warning ...
> > > Is defmacro okay?
No. defmacro and define-macro are basically the same. They're kludges. You can use them if you want, but don't don't complain if something doesn't work.
Thats really bad. I mentally need low-level macros. Lisp is not worth programming without being able to fiddle with the symbols before evaluating.
But I couldn't understand what was the problem with defmacro in this post: http://sourceware.org/ml/kawa/2006-q4/msg00020.html
Can you give an example of a case where defmacro might lead to trouble?
(define (low-level-macro-helper all) (eval `(dosomethingcoolwith ,@all)))
(define-syntax low-level-macro (syntax-rules () ((_ arg1 arg2 ...) (def-class-helper (quote (arg1 arg2 ...))))))
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |