Subject: Re: [boost] [Filesystem V3] Filesystem Version 3 beta 1 available for download and comment
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2010-02-18 10:35:45
Beman Dawes wrote:
> Important differences from the prior version:
I just looked through this page and have the following comments:
"stem" means nothing to me. I followed the Reference link to the path class documentation and find no description of it there.
complete(), even though the term is odd versus the normal "absolute" terminology, works well because "complete" can be a verb. OTOH, absolute() is bad because "absolute" cannot be a verb, so it makes a bad function name. IOW, it should be named "make_absolute."
Similarly, unique_path() is poorly named because "unique path" is not a verbal. The function should be named "make_unique_path."
Typo: "To ease the transition, Versions 2 and 3 will both included...."
s/will both/will both be/
Why the ellipsis with the yellow background?
When looking at the path query functions to learn about "stem," I found the *painfully* highlighted "Deprecated convenience functions" section. I have comments on what's revealed therein:
You state that extension() returns the period to allow distinguishing between an empty extension and no extension. That seems wrong. Typical use cases for working with the extension will require stripping the period before proceeding, so you push extra work onto the client. Furthermore, I can't think of a case in which extension processing code would work differently when there is no extension and when the extension is empty. The extension is an empty string in both cases. Since you already provide has_extension() for distinguishing that there is one, extension() should return an empty string when nothing follows the period.
change_extension() requires that the client prepend a period to the new extension string. Why is that necessary? I can imagine several use cases in which the extension would be found without a leading period. The client code would then have to prepend a period to use change_extension(). Also, if you change extension() as I note above, then it will return the right value for change_extension()'s second argument.
Software Engineer, Core Software
Susquehanna International Group, LLP robert.stewart_at_[hidden]
IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.