[r6rs-discuss] [Formal] Version reference syntax is overly complex.

From: Erich Rast <erich>
Date: Mon, 18 Jun 2007 10:13:00 +0200

>
>> Plus possibly the following shortcut: If instead of a procedure a
>> number n is given, it is treated like (lambda (version) (>= version
>> n)), since this is the most commonly used case.

>> then a request for version 1.3
> would mean 1.3 or 1.4 or 1.999999 but not 2.22.
>
> The situation is just too complicated to be handled by a single rule.
>

Yes, I agree, though I'd rather have a simplified versioning than
none at all. How about this modification to my proposal:

When a procedure with one argument is supplied in the import form, it
is evaluated as a test predicate with the version number supplied by
the library as an argument. When instead of a procedure a version
number is given in the input form, it is passed to a test predicate
supplied by the library, i.e. a library must specify a version number
and a predicate that yields non-false if a requested version is
compatible with the current version of the library, #f otherwise. If
the result of a test is not #f, the library is imported.

Regards,

Erich
Received on Mon Jun 18 2007 - 04:13:00 UTC

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