
On Mon, Mar 26, 2012 at 4:51 PM, Sebastian Redl <sebastian.redl@getdesigned.at> wrote:
On 26.03.2012, at 22:18, Beman Dawes wrote:
...
Here is a new spec rewritten as an Effects clause:
Effects: * Any existing extension() is removed from the stored path, then * iff new_extension is not empty and does not begin with a dot character, a dot character is appended to the stored path, then * new_extension is appended to the stored path.
That seem clearer to me than the previous wording, and corrects the missing removal of any existing extension(). Does it look OK to you?
I'm working on test cases now, and will commit as soon as they are done and passing.
Sounds ok. Does this mean that if I do path("a/b.c").replace_extension("d/e"), the result will be "a/b.d/e"?
Yes. Should there be a precondition that new_extension not include a directory specifier? I can't think of any valid use cases off the top of my head. The use cases I can think of are misuses. --Beman