[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Overuse of strings

Lauri Alanko <la@xxxxxx> wrote at 2006-01-25T19:19:28+0100:
> Any sane implementation will first parse the URI into its constituents
> and form a list of path segments, and then operate on that list. It
> would be just silly to constantly parse and unparse the URIs at every
> operation, so it's better to have a distinct internal representation for
> them. And indeed, this is why many languages do have special types or
> classes for representing URIs.

Regarding this assertion, one additional data point: my "uri.scm"
library ("http://www.neilvandyke.org/uri-scm/";) supports both string and
parsed representations of URIs, and allows them to be intermixed.  I
expect most programmers will just use the string representations, as
they are more convenient and familiar in general.

Regarding the use of URI syntax by the proposed module system: that
strikes me as potentially a great idea.  Before codifying a URI use like
this in a Scheme standard, I'd be curious how this meshes with the
Internet.  For example, I imagine that W3C- and IETF-types would have
comments wrt the authority component of the URI if the "scheme"
URI-scheme were proposed.  I suspect some would question whether or not
a new URI-scheme is needed, which might beg other questions.