Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2008-07-05 07:05:48

John Femiani wrote:
> Beman wrote:
> <Snip>
>> "stem" is an interesting suggestion. For "word stem",
>> Wikipedia says "In linguistics, a stem (sometimes also theme)
>> is the part of a word that is common to all its inflected
>> variants." That pretty much describes the basename concept.
>> --Beman
> What if the 'replace_extension' (aka 'change_extension') function just
> took an empy string as a default second argument? Isn't that the same as
> basename? Then you don't need 'base_name' or 'stem' at all. Also
> extension/change_extension should not be a member function since they
> should be defined in a separate header so that people who don't believe
> in extensions don't have to include them.

While that may be correct in a technical sense, it is too clever by
half. The point of renaming functions is to make the interface more
obvious and intuitive, and using replace_extension to get the stem seems
to me to go in the opposite direction.


Boost list run by bdawes at, gregod at, cpdaniel at, john at