[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Macro vs Function
From: |
David Kastrup |
Subject: |
Re: Macro vs Function |
Date: |
Wed, 12 Apr 2006 11:24:16 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
"Herbert Euler" <address@hidden> writes:
>>From: David Kastrup <address@hidden>
>>To: "Herbert Euler" <address@hidden>
>>CC: address@hidden
>>Subject: Re: Macro vs Function
>>Date: Wed, 12 Apr 2006 11:07:48 +0200
>>
>>The macro is executed at function definition time, the function
>>at execution time.
>
> Sorry I don't quite understand this. Could you please explain it?
> Thanks. But the following two programs seem to be same:
Which two programs?
> (defun g ()
> nil)
>
> ;; macro
> (defmacro m (a)
> (if a
> t
> nil))
> (m (g))
>
> ;; function
> (defun f (a)
> (if a
> t
> nil))
> (f '(g))
There is a difference between calling a macro directly, and compiling
a function refering to a macro.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
- Macro vs Function, Herbert Euler, 2006/04/12
- Re: Macro vs Function, David Kastrup, 2006/04/12
- Re: Macro vs Function, Herbert Euler, 2006/04/12
- Re: Macro vs Function,
David Kastrup <=
- Re: Macro vs Function, Herbert Euler, 2006/04/12
- Re: Macro vs Function, David Kastrup, 2006/04/12
- Re: Macro vs Function, Herbert Euler, 2006/04/12
- Re: Macro vs Function, Andreas Schwab, 2006/04/12
- Re: Macro vs Function, Herbert Euler, 2006/04/12
- Re: Macro vs Function, Herbert Euler, 2006/04/12
- Re: Macro vs Function, David Kastrup, 2006/04/12
- Re: Macro vs Function, Herbert Euler, 2006/04/12
- Re: Macro vs Function, David Kastrup, 2006/04/12
- Re: Macro vs Function, Herbert Euler, 2006/04/12