On Thu, Sep 11, 2003 at 01:17:29PM +0300, Vladimir Lipskiy wrote:
> > Shouldn't that be "."?
> >
> > > append_filename("a", "") = ""
> >
> > "a"
>
> Umm. Don't think so. At least it will be that
> way until you convince me that it must be
> another way
concat_dirnames("a", "") = "a"
concat_dirnames("", "b")= "b"
ergo
append_filename("a", "") = "a"
Why wouldn't appending no filename onto a directory result in the directory
being returned? Unless append_filename() guarantees that it will always
return a filepath ending in a filename?
> > What about
> >
> > append_filename("", "b") ?
> >
> > Would that be an error?
>
> No. It's okay. I just forgot to mention that case.
>
> append_filename("", "b") will produce "b"
Now wait a second. append_filename("a", "") produces nothing but
append_filename("", "b") produces a filename? Isn't that a little
inconsistent?
> > concat_dirnames("/foo", "/bar") = error?
> > concat_dirnames("foo", "/bar") = error?
> > concat_dirnames("/foo", "bar") = "/foo/bar"
>
> I just want to remind you the Leo's words:
>
> "Please keep in mind, that the intended usage inside Parrot just should
> be to locate some standard include or extension files for Parrot
> internals. More abstraction and complexity can always be added above
> that or implemented by HLLs." -- Him.(~:)
>
> I don't suppose Leo will be pass in spoiled data.
Famous last words: "Our data is perfect, we don't need to check our inputs."
> > What about volumes?
>
> I plan a special functions for volumes, and nodes,
> and root dirs like prepend_volume, prepend_node,
> prepend_rootdir.
>
> For example, prepend_rootdir could throw the
> "prepend_rootdir is unsupported on this platform"
> exception on windows. Of course, I will go implement
> those if Parrot needs those.
Ok, but what happens when I pass filepaths with volumes attached to
concat_dirnames? What if the volumes don't match? What if I'm adding a
path with a volume to one without?
--
Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern/
Death? Its like being on holiday with a group of Germans.