Re: I would have started a new thread [was Re: Understanding Lisp error message(s)]
- From: Ken Tilton <kentilton@xxxxxxxxx>
- Date: Tue, 21 Mar 2006 02:50:11 -0500
A clarification....
Foxpointe wrote:
Also, the function below doesn't need the list 'flattened' for the same reason?
(defun make-test-instance (field-list)
(apply 'make-instance 'test-class field-list))
In this case, the functions make-test-instance and apply never see the symbol field-list! They only see the runtime list value that had better be passed to make-test-instance.
The trick with writing macros is to keep clearly separate in your mind compile time vs run time, and to remember that outside the backquotes you are in compile time and just manipulating source code, inside the backquote you should be thinking about runtime and the values that will be bound to different variables then.
Again, the debugging statements outside the backquotes will help you get used to thinking about compile time.
kt
--
Cells: http://common-lisp.net/project/cells/
"And I will know my song well before I start singing." - Bob Dylan
.
- Follow-Ups:
- References:
- Understanding Lisp error message(s)
- From: Foxpointe
- Re: Understanding Lisp error message(s)
- From: Ken Tilton
- Re: Understanding Lisp error message(s)
- From: Foxpointe
- I would have started a new thread [was Re: Understanding Lisp error message(s)]
- From: Ken Tilton
- Re: I would have started a new thread [was Re: Understanding Lisp error message(s)]
- From: Foxpointe
- Understanding Lisp error message(s)
- Prev by Date: Re: I would have started a new thread [was Re: Understanding Lisp error message(s)]
- Next by Date: Re: Bits from a stream
- Previous by thread: Re: I would have started a new thread [was Re: Understanding Lisp error message(s)]
- Next by thread: Re: I would have started a new thread [was Re: Understanding Lisp error message(s)]
- Index(es):