On Wed, 27 Jun 2007, Lynn Winebarger wrote:

> On 6/27/07, AndrevanTonder <[EMAIL PROTECTED]> wrote:
>> 
>> On Wed, 27 Jun 2007, Lynn Winebarger wrote:
>> 
>> >    The draft may not require an implementation compile libraries
>> > separately, but it does appear that whatever the semantics are,
>> compiling
>> > separately or together must be equivalent.
>> 
>> For portable libraries, I believe that is the intention, but note that
>> the draft explicitly allows compiling separately or together to be
>> /inequivalent/ when expand-time state is involved,
>
>
>     Can you point to where this statement is made?

In 7.2 (emphasis mine):

   An implementation *may* distinguish instances/visits of a library for
   different phases or to use an instance/visit at any phase as an
   instance/visit at any other phase. An implementation *may* further start each
   expansion of a library form by removing visits of
   libraries in any phase and/or instances of libraries in phases above 0.

   ...thus, a library is portable only when it references identifiers in phases
   consistent with the declared levels, and
   a library whose meaning depends on whether the instances of a library are
   distinguished or shared across phases or library
   expansions may be unportable.

>> If you don't like that, consider the following:
>>
>>   Libraries or programs that use runtime state are not portable.
>> 
>> This is because, as for compilation, the draft allows a program or library
>> to
>> use the values of bindings left over from yesterday's, or last year's,
>> instantiations, without requiring reinitialization.
>>
>>       Where can I find the statement you indented in the draft?

That was my own statement.  It is implied by the following in 7.2:

   ... a library whose meaning depends on whether the instances of a library are
   distinguished or shared across phases or library
   expansions may be unportable.

In other words, the behaviour of the program

   (import (foo))
   (display foo-x)

in a fresh instance of the runtime system may be different from its behaviour
in a system where (foo) has previously been instantiated during the compilation 
of some other library.

> Is there
> a section giving conditions that guarantee portability of code, rather than
> intermittently declaring when it isn't?

The note at the end of 7.2 has a very limited guarantee.

Andre

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to