[r6rs-discuss] Libraries

From: Abdulaziz Ghuloum <aghuloum>
Date: Fri Nov 10 12:32:22 2006

On Nov 10, 2006, at 1:03 AM, MichaelL_at_frogware.com wrote:

> I think version numbers are somewhat similar. At first blush having
> version numbers sounds great--but then how do you actually use them?
> You
> can restrict an import to certain version numbers... and then what
> happens? It seems like the only thing you can really do is have an
> import
> fail if an appropriate version isn't present. Well, you could just
> about
> do that by putting a version number into the symbol naming the library.

No actually. The version numbers serve a greater purpose as they are
right now. The situation you're describing might be appealing for a
single developer writing a whole program. The single developer *can*
use your naming scheme (attaching the version to a library name)
without complications using the current (5.91) library specification.
The situation changes with multiple developers or with libraries pulled
from central code repositories (like PLT's planet, Perl's CPAN, Chicken
Eggs, Ruby Gems, ...). In these situations, it is better to have a
single agreed-upon versioning scheme to specify exactly what the import
requirements for a library are. You want to be able to look at a
library and figure out exactly what it needs rather than attempt to
guess what versioning scheme was used. Moreover, it gives you the
option of upgrading a library (using minor versions) without having to
go through every single file in your system (or in the world) to rename
the imported library names.

Now regarding the library names being a single identifier vs. a list, I
agree that a single identifier is simpler and there is no need as of
right now for composite names. A naming convention might be needed
though in order to disambiguate the different parts. For example, Perl
(and others perhaps) uses :: as a name separator. A dash may not be
ideal since it is used extensively in identifier names (for example,
r6rs-hash-tables does not imply that there might be r6rs-hash-trees.
r6rs::hash-tables or r6rs/hash-tables do a better job separating the
names).

Aziz,,,
Received on Fri Nov 10 2006 - 12:32:00 UTC

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