[r6rs-discuss] Binary compatibility?

From: Pascal Costanza <pc>
Date: Sun, 17 Jun 2007 13:37:06 +0200

Hi,

I am pretty sure that I have the syntax wrong in the following
examples, but I hope you get the idea.

Assume there are three compilation units:

(library (accounts)
    (export account draw)
    ...)

(library (graphics)
    (export rectangle paint)
    ...)

(library (main)
    (export)
    (import (accounts) (graphics))
    ... (draw ...) ...)

Assume these three compilation units are compiled in that order.

Now the first two libraries are changed and recompiled:

(library (accounts)
    (export account withdraw)
    ...)

(library (graphics)
    (export rectangle draw)
    ...)

However, the 'main library is _not_ recompiled. (Maybe 'accounts and
'graphics are third-party libraries and you're not aware that you
should recompile dependent libraries, or some such.) Note that there
is no exported 'draw variable anymore in 'accounts, but a (presumably
semantically different) 'draw variable exported from 'graphics.

Questions:

a) Which definition of 'draw will 'main refer to at runtime, if any.
b) Will this be determined at link time, load time or runtime? Is an
attempt to use the not recompiled 'main an error?
c) If 'draw still internally exists in 'accounts, but is simply not
exported anymore, will that definition be used?
d) In other words, should R6RS say something about binary
compatibility (similar to what the Java Language Specification
specifies), or is this outside of the scope of the specification?

BTW, this is one of the reasons why Modula-2 and Oberon don't allow
unqualified imports: If all imports are required to be qualified,
then there is no ambiguity here.


Pascal

-- 
Pascal Costanza, mailto:pc at p-cos.net, http://p-cos.net
Vrije Universiteit Brussel, Programming Technology Lab
Pleinlaan 2, B-1050 Brussel, Belgium
Received on Sun Jun 17 2007 - 07:37:06 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC