[plt-scheme] efficient string operations yielding immutable strings

From: Anton van Straaten (anton at appsolutions.com)
Date: Fri Mar 26 11:14:44 EST 2004

Eli Barzilay wrote:

> On Mar 26, Matthias Felleisen wrote:
> > As Paul Graham likes to point out, Lisp (and Scheme is one in his
> > mind) uses library names that are way too long. [...]
>
> BTW, the *only* line in Swindle that is longer than 79 characters is
> due to this unforgettable name (+ some indentation):
>
>
>
drscheme:language:simple-module-based-language->module-based-language-mixin

Perhaps getting OT, but...

The way Java (and, for that matter, SML etc.) get around this kind of thing
is with name hierarchies which the language knows how to construct and
deconstruct.  Having come from that general world myself (OO languages
etc.), I've often thought this could make sense in Scheme.  For example,
assuming a module or package or whatever called
drscheme:language:module-based-languages has been "required", the above name
might be something like simple-language->language-mixin (or something like
that, you get the idea).

I particularly think this kind of thing has an impact on the viability of
community shared code.  Without having done a detailed survey, my sense is
that all the language communities with organized central code repositories,
like CPAN etc., depend on such a system.  Java doesn't have a single central
repository, but its shared code (various open source libraries) depends
enormously on its naming system - in fact, Java gets away without a central
repository precisely because of the naming system, which "guarantees"
uniqueness based on reverse domain names (e.g.
org.plt-scheme.drscheme.language.module-based-languages).

Of course, you can shorten names via renaming in PLT Scheme, but the flaw in
that with respect to community-wide code reuse is that there is no
standardization on shorter names, which means that when you look at someone
else's code containing abbreviated names, it's meaningless until you've
internalized whatever abbreviation mappings they've chosen.

Renaming with an abbreviated prefix could help, e.g. the above could be
something like mbl:simple-language->language-mixin.  That could mitigate the
fact that Scheme code is not necessarily OO, so the namespace of a class is
not always present to disambiguate names.  But you still need some kind of
standard for that to work on a large scale.

Anton



Posted on the users mailing list.