On Apr 26, 2009, at 11:42 AM, Michele Simionato wrote:
But in order to explain how to write portable macros I have to talk
about
the differences!
No. You can talk about the guarantees that are required by the R6RS
(and to which all of Ikarus/Larceny/PLT/Ypsilon conform). Explaining
the guarantees, to which all implementations behave the same, should
be easier than explaining all the differences between various systems.
For instance, I must say why
(import (only (my-module some-helper-function-to-be-used-in-a-macro)))
works in Ikarus but does not work on PLT/Larceny, and I have to
explain phase separation.
This is precisely what Derick is saying not to do. :-)
For example, you can say "Imported identifiers may be used at different
times (in syntax and in variable definitions) but to be portable, you
have to specify, using the 'for' syntax, in which times identifiers are
used. Doing so makes the library work in systems that require the 'for'
syntax and systems that simply ignore it.". Similarly, you can say that
"R6RS allows implementations to evaluate library bodies 0 or more times
and, therefore, portable libraries cannot depend on the number of times
they are evaluated. Thus, side effects within a library should only
initialize the data structures contained in that library and should not
modify data structures belonging to other libraries. ...".
So, I agree with Derick. The focus should be on the portable libraries
not the diverging unportable behaviors.
Aziz,,,