[r6rs-discuss] [Formal] Multiple versions of one library should be linkable

From: Jed Davis <r6rs>
Date: Sat, 23 Jun 2007 01:16:59 -0400

On Wed, Nov 15, 2006 at 11:30:00PM -0500, Carl Eastlund wrote:
>
> I propose that the library replication restriction should be lifted.
> Many libraries have no need for the restriction. The restriction can
> make technically compatible and seemingly unrelated libraries
> incompatible, and can prevent incremental development of software.
> The library replication restriction does not seem to be the right way
> for R6RS to address the stated problems.

There are also unstated problems.

For example, let's say you import a url-downloader library, which in
turn imports crypto-stuff to do SSL. It makes some sort of state object
from crypto-stuff accessible for some reason, which you have reason to
want to manipulate.

So, you want to get the same version of crypto-stuff as, or at least
one compatible with, the one that url-downloader got. You may also
have further restrictions on the version based on what of the library's
interface is needed; and you may be using crypto-stuff for something
else unrelated as well.[*]

Or, if each of these hypothetical components were packaged as a
collection of smaller libraries, each one should be able to know that it
has imported the same version as its comrades did, if needed.

Such constraints would need a way to be expressed.


Oh, also: in R5.94RS as it stands, the problem of either finding a
subset of available libraries such that all <import spec>s are satisfied
and no library is present in multiple versions, or else proving
that no such thing exists, is not trivial. In particular, unless I
misunderstand something important, there is a fairly straightforward
encoding of graph coloring. If it is in fact desired to oblige
implementations to do an exhaustive search (and it probably should be),
then a clarification might not go amiss.


[*] This entirely fictitious example being derived from a real-world
fight with PHP, cURL, and OpenSSL. ELF did not handle this so well, IIRC.
-- 
(let ((C call-with-current-continuation)) (apply (lambda (x y) (x y)) (map
((lambda (r) ((C C) (lambda (s) (r (lambda l (apply (s s) l))))))  (lambda
(f) (lambda (l) (if (null? l) C (lambda (k) (display (car l)) ((f (cdr l))
(C k)))))))    '((#\J #\d #\D #\v #\s) (#\e #\space #\a #\i #\newline)))))
Received on Sat Jun 23 2007 - 01:16:59 UTC

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