From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-05-05 03:14:28


Beman Dawes wrote:

> >Yes, I think that's so. I attach a patch against CVS HEAD with
> >implementation,
> >docs and tests. Could you take a look and tell if anything should be
> >corrected?
>
> * There are two places in the docs where what should be shown as '.' is
> showing up as '.' (browser is IE 6).

Hm... ' is only defined in XHTML, as tidy just reported.

> * empty() is misspelled as empy() in several places. But see next item.
>
> * I think the preconditions should be removed. In each case, the behavior
> as specified is quite sensible even if ph.leaf().empty(), and may be useful
> in some applications. (Assuming you agree, the assert()'s should be
> removed, and test cases should be added.)

Let me ponder a little. For 'extension', the idea that empty path has empty
extension seems ok. For 'basename' this looks even more resonable. However,
for "change_extension", this is not so. If you call
   
    change_extension("", ".txt")

you'll get ".txt" as result, which has no sense at all. But I'm not sure the
assertion, here, is so big help. So I'll removed precondition here as well,
but add a bit of rationale.

However, I've a question: if is always true that ph.leaf().empty() ==
ph.empty. IOW, is it ever possible to have empty element in the sequence of
strings that compose the path?

> * You have my permission to remove my copyright from the docs and add your
> own. You've contributed all the pieces, so no need to mention me.

Okay.

>
> * Please add "Contributed by Vladimir Prus." to each function. I'd like to
> track all contributors.

Okay.

> * Go ahead and commit to CVS. Then let's keep an eye on the test results
> for a couple of days as the changes get tested on various platforms.

I'll do that later today, when (I hope) my internet connection works again.

Thanks,
Volodya