Subject: Re: [boost] [Filesystem V3] Filesystem Version 3 beta 1 available for download and comment
From: John Bytheway (jbytheway+boost_at_[hidden])
Date: 2010-02-19 05:06:45
Beman Dawes wrote:
> On Thu, Feb 18, 2010 at 10:35 AM, Stewart, Robert
> <Robert.Stewart_at_[hidden]> wrote:
>> 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.
> IIRC, that was Volodya's original design and I can't recall anyone
> ever complaining about it. True, we didn't have the has_extension()
> function, but still, I hate to break existing code. Does anyone else
> have a strong opinion?
FWIW, the GNU Make function 'suffix' also sets a precedent of including
On the rare occasions I've had cause to use it this has seemed natural.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk