Hi On 13 May 2010 03:02, Stuart Halloway <stuart.hallo...@gmail.com> wrote: >> * Decidedly, I have bad feelings when I read about the "magic" of >> "coercing" a String first as a URL, and if not possible, fall back and >> consider it a local absolute/relative path. I'm "mitigated" in the >> sense that either it's too magic and should got rid of, either it's >> interesting and could be promoted as a behaviour in the predefined >> Coercions ? > > This is good magic. The space of strings that look like file URLs is > disjoint from those that look like paths, and both are reasonable > expectations (based on my ad hoc survey of other languages.)
They are actually not disjoint: $ mkdir -p "http://www.example.org/cgi-bin/" $ echo something >"http://www.example.org/something.cgi?key=value&fred=bloggs" $ echo blah >"http://www.example.org/cgi-bin/test.cgi?x=y&full-name=Fred%20Bloggs" $ find http\:// http:// http://www.example.org http://www.example.org/something.cgi?key=value&fred=bloggs http://www.example.org/cgi-bin http://www.example.org/cgi-bin/test.cgi?x=y&full-name=Fred%20Bloggs $ cat "http://www.example.org/cgi-bin/test.cgi?x=y&full-name=Fred%20Bloggs" blah And the same would, of course, work for file:/// instead of http://. Of course it's unusual to do something like the above, but there's nothing wrong with those paths. Unix filesystems have no problem with ":", "?", "=", "&", etc. in file or directory names and multiple directory separators are treated as if there was just one. -- Michael Wood <esiot...@gmail.com> -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en