Re: pathname with tilde and wildcard characters
Richard M Kreuter via Sbcl-help <[email protected]>
| Newsgroups | gmane.lisp.steel-bank.general |
|---|---|
| Message-ID | <[email protected]> |
Stas Boukarev <[email protected]> wrote: > (namestring (parse-native-namestring "~/foo??.lisp")) > => > "~/foo\\?\\?.lisp" > > So it escapes the wildcards but doesn't escape ~. That might actually > be a bug in sbcl. IMO it's a bug relative to the apparent intended design. But can anybody think of a reason why there should be a late-binding representation of user home directories, as opposed to expanding the tilde notation in parse-namestring (i.e., what ABCL, Allegro, CCL, Clisp, ECL, and LispWorks do)? AFAICT, every program where late-binding of #P"~/" could make a difference could be written using a combination of merge-pathnames and/or enough-namestring with user-homedir-pathname (and must be written that way for a program to work on other implementations). The only unique use case I can think of is to let you dump a fasl containing a pathname with (:absolute (:home <user>)) and have that pathname resolve differently on another Unix host. But the representation makes for extra cases for users and maintainers to need, and, more importantly, to forget, to deal with. Regards, Richard