Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2006-01-31 10:21:20


"Eric Niebler" <eric_at_[hidden]> writes:

> David Abrahams wrote:
>> "Eric Niebler" <eric_at_[hidden]> writes:
>>
>>> A different approach to achieve the same ends might be to define
>>> overloads of the C string APIs that worked with std::string,
>>
>> Gee that smells like a familiar idea ;-)
>>
>>> so the migration of legacy code can actually eliminate bugs instead
>>> of making them less severe. Has this approach been considered?
>>
>> I think that's my point, Eric :)
>
>
> :-P That's what I get for only skimming the thread -- I didn't see you
> suggest this approach. Sorry for the noise, and consider this an
> endorsement of Dave's suggestion.

To be fair, I didn't suggest that specifically until forced into it by
Gennadiy. My fundamental position is that you should probably *not*
be using a fixed-sized string for this sort of transition. The
details of how you use a variable length string are less important to
me. If you want to keep a <cstring>-like interface, that's fine, but
ideally all that code should be revisited anyway and you could easily
end up with better code by translating it to a more natural and
expressive interface.

Regards,
Dave

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk