Boost logo

Boost :

Subject: Re: [boost] [string] proposal
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2011-01-27 08:52:29


Artyom wrote:
>
> 1. Why do YOU think you'll be able to create something "better"?

Why does anyone think they can improve upon the past? Perhaps they will and perhaps not. Should that preclude the attempt?

> 2. Why do YOU think boost::string would be adopted in
> favor of std::string or one of the current widely used
> QString/ustring/wxString/UnicodeString/CString?

The obvious answer is that such adoption would occur if it was sufficiently superior in interface, functionality, performance, etc., or some combination thereof. There is a tradeoff one must make: the pain of switching versus the benefits that accrue. Obviously, the more similar the interface of boost::string (which, in Dean's vision, might just be a typedef for view<some_default_encoding_like_utf_8>) to the existing string types, the more readily it can be switched. However, that may, or may not, be a good thing. If the behavior is sufficiently different, such as throwing exceptions (or no longer throwing exceptions) in specific use cases, runtime behavior will change silently. In such cases, a completely different interface would be better as it would force the programmer to examine each use separately.

> 3. What so painful problems are you going to solve that
> would make it so much better then widely used and adopted
> std::string? Iterators? Mutability? Performance?
>
> (Clue: there is no painful problems with std::string)

Clue: there are many painful problems with std::string. It is infinitely better than having no string class in the standard, but it has problems. Dean was fairly exhaustive on this point, so I'll not say more here.

> 1. Accept it that there is quite small chance that something
> that is not std::string would be widely accepted

I disagree. std::string has a significantly better chance than any arbitrary tom_dick_and_harry::string, all things being equal. However, the goal of this thread, and others, is to consider how to create a better string, not just another.

_____
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP http://www.sig.com

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.


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