[wx-dev] Re: #9672: wx 2.9 Ansi/Unicode Combi-wxString breaks compatibility with std::[w]string and introduces subtle errors

Vadim Zeitlin vadim at wxwidgets.org
Sun Jul 6 16:46:57 PDT 2008


On Sun, 06 Jul 2008 21:27:19 +0200 Robert Roebling wrote:

RR> Julian Smart wrote:
RR> 
RR> > > I wasn't aware that one 'should use std::string' anyhow and others 
RR> > > probably will be surprised as well. If a GUI library defines a string 
RR> > > class, why not use it?
RR> >
RR> > I would agree. Apart from the sheer inconvenience of switching between 
RR> > two similar string classes, there's never been anything to suggest that 
RR> > wxString is for GUI stuff only. So for people with hundreds of thousands 
RR> > of lines of wxString-using code to be told to ditch wxString for non-GUI 
RR> > purposes all of a sudden... it doesn't feel right to me.
RR> 
RR> I think the argument is rather: if you absolutely want something
RR> identical to std::string, just use std::string. There is obviously
RR> nothing wrong with continuing to use wxString.

 For once I couldn't agree more with Robert. You shouldn't take my
statements out of context in which they were made, which is a thread
starting with complaints (which are not baseless but neither are
catastrophic IMO) about imperfect compatibility between wxString and
std::string. Obviously you can still use wxString if this is not a problem
for you.

RR> > I think users might expect to at least have the option of getting
RR> > the previous wxString efficiency back. 

 This thread so far wasn't about efficiency at all. Please let's not mix up
everything if possible.

 Regards,
VZ



More information about the wx-dev mailing list