[armedbear-devel] Proposal for URL to be used as Pathnames

Mark Evenson evenson at panix.com
Fri Mar 26 08:34:48 UTC 2010

I've [committed to an initial design][1] for URLs to be used as 
Pathnames, which I am in the process of implementing.  The primary use 
of this functionality will be to be able to eventually express OSGi 
bundles within ASDF system definitions.


The gist of the proposal is to represent a URL with a Pathname whose 
HOST component is a list.  The list will be an association list with the 
key :SCHEME containing the URL scheme and :AUTHORITY containing the URL 
authority.  The DIRECTORY, NAME, and TYPE components will be used to 
construct the PATH of the URL.

As an example, "http://example.org:8080/org/armedbear/lisp/boot.lisp" 
would be converted to a Pathname as follows

   pathname: {
     host: (:SCHEME "http" :AUTHORITY "example.org:8080"),
     directory: (:ABSOLUTE "org" "armedbear" "lisp"),
     name: "boot",
     type: "lisp"

As an answer to Alessio's question (long ago) about whether URLs should 
really be a Pathname or if we are better off using a class, I think that 
they really are better abstracted as a Pathname because they a) have a 
hierarchical path b) the network location has a strong resemblance to 
how HOST is used for UNC mounts under Windows and c) being able to 
express OSGi bundles in ASDF has a chance of working.

Critique welcome.

"A screaming comes across the sky.  It has happened before, but there
is nothing to compare to it now."

More information about the armedbear-devel mailing list