[armedbear-devel] Proposal for URL to be used as Pathnames
Alessio Stalla
alessiostalla at gmail.com
Fri Mar 26 08:44:20 UTC 2010
On Fri, Mar 26, 2010 at 9:34 AM, Mark Evenson <evenson at panix.com> wrote:
> 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.
>
> [1]:
> http://trac.common-lisp.net/armedbear/browser/trunk/abcl/doc/design/url-pathnames.markdown
>
> 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.
FWIW, CLForJava also represents URLs as pathnames:
http://clforjava.org/Documents/ELS%202008%20-%20Abstraction%20of%20Pathnames%20and%20Streams.pdf
Bye,
Alessio
More information about the armedbear-devel
mailing list