On Apr 26, 2009, at 12:20 PM, Michele Simionato 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?

Right.  And Ikarus guarantees that a library is visited when some
code that references one of its exported macros is expanded (since
that's precisely the time when the transformer is needed).  The
library is also marked "visited" the first time you expand it
because its syntax definitions would be evaluated at that time.
Ikarus also guarantees that in every running (OS-level) instance
of ikarus, there is precisely one instance of that library.  The
library may be visited or invoked (independently) depending on how
its exports are used.

I assume this is true for all R6RS implementations, but the
number of times the module is visited is implementation-dependent.

Correct.  It may be 0, 1, 22, or whatever.

I am progressing one small step at the time ...

P.S. Aziz, I am considering the idea of putting you as co-author of my
Adventures! -)

I think it's better to keep the adventures "implementor-independent"
so they don't get dismissed by association.  :-)

Aziz,,,

Reply via email to