On Sun, Apr 26, 2009 at 6:20 AM, Michele Simionato
<[email protected]> wrote:
> On Sun, Apr 26, 2009 at 9:09 AM, Abdulaziz Ghuloum <[email protected]> wrote:
>
>> Study the next library and let me know if you have questions.
>
> I was missing the concept of visit time. So you are saying that if I put this
> macro in a module
>
> (define-syntax compilation-time
>  (let ((isodate (date->string (current-date) "~5")))
>    (display "Visit time: ") (display isodate) (newline)
>    (lambda (x) isodate)))
>
> the visit time will be printed every time the module is visited,
> independently from the fact that the module was pre-compiled
> or not. In other words, the right hand side of a macro definition
> is re-evaluated at each visit, right?

Macros are never compiled, they are unfinished code, after all.  It's
the same concept as C++ templates too, which simply reside in header
files:  they are a recipe to generate code, not compiled code.

Reply via email to