Re:Why Is Swift's String API So Hard?
by kazinator on Friday November 06, 2015 @11:09AM
(#10520173)
> implementation-defined (since different platforms have different conventions) mapping from strings to path objects.
Unfortunately, this translates to a problem. We don't have that many path representations any more, but Common Lisp implementations for the same platform (or platform family, like POSIX) do the translation differently.
If you want to work with CL pathnames, but expose paths as strings to the user, and use multiple CL implementations, you have to write your own path translation which behaves the same way.
For instance, what is
a/b/c/
? Is that a pathname with directory a b c, and an empty name? Or directory a b and name c?
Do you map suffixes to types? How about compounded suffixes like .tar.gz? Is that a "tar.gz" type or a "gz" type?
Unfortunately, this translates to a problem. We don't have that many path representations any more, but Common Lisp implementations for the same platform (or platform family, like POSIX) do the translation differently.
If you want to work with CL pathnames, but expose paths as strings to the user, and use multiple CL implementations, you have to write your own path translation which behaves the same way.
For instance, what is
? Is that a pathname with directory a b c, and an empty name? Or directory a b and name c?Do you map suffixes to types? How about compounded suffixes like .tar.gz? Is that a "tar.gz" type or a "gz" type?