search for the definitions of seperate and independent compilation.
On Mar 26, 7:08 am, Michele Simionato <[email protected]> wrote: > I am writing the chapters of my Adventures relative to the R6RS module > system and to the phase separation concept. > In doing so, I realized that I am still missing a crucial point. > Therefore, I am asking for enlightenment here. > > As I understand, there are three possible semantics for R6RS > implementations > (I may be using incorrect terminology, but it should be clear what I > mean): > > 1. full phase separation (mzscheme, Larceny); there is an infinite > tower of > metalevels, and you are forced to specify at which phase you want > to import > the names; > > 2. partial phase separation (Ikarus); importing a name imports it at > all > levels; > > 3. no phase separation (REPL of Ikarus and Ypsilon). > > The rationale for 1 is that some people (not me) want the freedom to > use different languages at different levels. > > The rationale for 2 is that it is much easier and programmer friendly; > it also avoids the potentially infinite duplication of namespaces, > one > per level. > > The rational for 3 is that at the REPL it is very convenient to define > a helper function and then use it directly in a macro defined later > on. > > The point I am missing: why do not keep the semantics of the REPL > even for scripts and libraries? I mean in Ikarus. Clearly people > wanting full phase separation have no interest in this: actually > they force you to import explicitly even auxiliary macros, not > only auxiliary functions. Ikarus instead does not force you > to put auxiliary macros in a separate module. > > Thinking is the same direction, it is clear that the compiler in > theory > has access to the helper functions defined before the macros they are > intended > to be used to, and it could make use of this knowledge. Instead, > R6RS-compatibility forces us to put the auxiliary functions in an > auxiliary > module and to import them. > > I want to understand if you (Aziz and more generally the people here > which I believe are no fan of full phase separation) think that the > restriction from the R6RS is wrong and no phase separation at all > would be a better solution, or if I am just missing something and > perhaps the partial phase separation of splitting macros from > auxiliary > functions (and in general other names that would be define at runtime > only) is needed in some way. I mean, I would like to go in a direction > of no phase separation at all, where all names at toplevel are defined > both at compile time and at runtime. This was the semantic I expected > from day one when I learned Scheme, and it is the semantic > of the REPL. > > Why we cannot keep it?
