Discussion:
[Interest] Why QString and not std::string?
Rui Maciel
2012-06-15 10:50:47 UTC
Permalink
Does anyone know what's the rationale for relying on Qt's custom QString
instead of simply using C++'s standard and omnipresent std::string?


Thanks in advance,
Rui Maciel
Konstantin Tokarev
2012-06-15 10:55:11 UTC
Permalink
Post by Rui Maciel
Does anyone know what's the rationale for relying on Qt's custom QString
instead of simply using C++'s standard and omnipresent std::string?
1. Historical reasons - STL was not implemented on the same level in all compilers
in the past.
2. std::string does not hadle UTF16 strings, and std::wstring is non-standard
--
Regards,
Konstantin
Rui Maciel
2012-06-15 11:19:27 UTC
Permalink
Post by Konstantin Tokarev
1. Historical reasons - STL was not implemented on the same level in all compilers
in the past.
Is this constraint still relevant today?
Post by Konstantin Tokarev
2. std::string does not hadle UTF16 strings, and std::wstring is non-standard
With C++11, UTF-16 strings are supported through the std::u16string
type, which is a typedef for basic_string<char16_t>.

Nevertheless, why is it important to support UTF-16?


Rui Maciel
Konstantin Tokarev
2012-06-15 11:25:54 UTC
Permalink
Post by Rui Maciel
 1. Historical reasons - STL was not implemented on the same level in all compilers
 in the past.
Is this constraint still relevant today?
Not so long ago it turned out that toolchain for some SoC was shipped without STL so I had
to eliminate its usage.
Post by Rui Maciel
 2. std::string does not hadle UTF16 strings, and std::wstring is non-standard
With C++11, UTF-16 strings are supported through the std::u16string
type, which is a typedef for basic_string<char16_t>.
Not everyone can use C++11 today.
Post by Rui Maciel
Nevertheless, why is it important to support UTF-16?
1. Faster string search modification than for UTF8
2. It's native UTF string format on Windows and Mac OS X.
--
Regards,
Konstantin
Rui Maciel
2012-06-15 14:29:33 UTC
Permalink
Post by Konstantin Tokarev
Post by Rui Maciel
Post by Konstantin Tokarev
1. Historical reasons - STL was not implemented on the same level in all compilers
in the past.
Is this constraint still relevant today?
Not so long ago it turned out that toolchain for some SoC was shipped without STL so I had
to eliminate its usage.
Wouldn't it be better to simply provide an alternative std::string
implementation for that specific case? And how relevant is that
requirement today?
Post by Konstantin Tokarev
Post by Rui Maciel
Post by Konstantin Tokarev
2. std::string does not hadle UTF16 strings, and std::wstring is non-standard
With C++11, UTF-16 strings are supported through the std::u16string
type, which is a typedef for basic_string<char16_t>.
Not everyone can use C++11 today.
But it appears that there is already some talks on implementing features
in Qt5 which rely on C++11.
Post by Konstantin Tokarev
Post by Rui Maciel
Nevertheless, why is it important to support UTF-16?
1. Faster string search modification than for UTF8
2. It's native UTF string format on Windows and Mac OS X.
How relevant is the efficiency of string search modification operations?
And what string data type is used in C++ projects that target Windows
or OSX?


Rui Maciel
Till Oliver Knoll
2012-06-15 15:02:12 UTC
Permalink
[proper recipient]
Post by Rui Maciel
...
Wouldn't it be better to simply provide an alternative std::string
implementation for that specific case?
That's what has been done: it's called QString ;)
Post by Rui Maciel
And how relevant is that
requirement today?
As others have mentioned, C++ 11 is not available everywhere yet.
Post by Rui Maciel
Post by Konstantin Tokarev
Post by Rui Maciel
Nevertheless, why is it important to support UTF-16?
1. Faster string search modification than for UTF8
2. It's native UTF string format on Windows and Mac OS X.
How relevant is the efficiency of string search modification operations?
EXTREMELY relevant! While not every application is constantly digging
through piles of text, I would dare to say that string operations
(concatenation, search, replace, regexp, ...) are one of the most
common operations that applications do. And be it just the parsing of
config files.
Post by Rui Maciel
And what string data type is used in C++ projects that target Windows
or OSX?
Guess what: UTF-16 ;) (that's the internal data format of QString).

Cheers, Oliver
BRM
2012-06-15 15:56:01 UTC
Permalink
Post by Till Oliver Knoll
Post by Rui Maciel
Post by Konstantin Tokarev
Post by Rui Maciel
Nevertheless, why is it important to support UTF-16?
1. Faster string search modification than for UTF8
2. It's native UTF string format on Windows and Mac OS X.
How relevant is the efficiency of string search modification operations?
EXTREMELY relevant! While not every application is constantly digging
through piles of text, I would dare to say that string operations
(concatenation, search, replace, regexp, ...) are one of the most
common operations that applications do. And be it just the parsing of
config files.
Post by Rui Maciel
  And what string data type is used in C++ projects that target Windows
or OSX?
Guess what: UTF-16 ;) (that's the internal data format of QString).
And to top it off, last I checked std::wstring on Linux (with GCC's libstdc++ at least) was UTF-32.

Yeah, that bit me a few weeks back when I was trying to write a Standard C/C++ library for an in-house file format
that only specified that certain fields were wide-characters in Unicode. The original code was all Win32 stuff
and the author didn't think to note in anything that it was UTF-16. So I had to write a little converter for what
I needed as C++11 is not available in all my build environments yet after figuring out that was what the problem was.


Ben
Thiago Macieira
2012-06-15 17:50:57 UTC
Permalink
Post by Rui Maciel
With C++11, UTF-16 strings are supported through the std::u16string
type, which is a typedef for basic_string<char16_t>.
That's great. Except that the standards people often forget the most basic
things should be easy...

Here's one they forgot. Please fill in the blank:

#include <string>

int main(int argc, char **argv)
{
std::u16string s = __________ (argv[1]);
}

I'm looking for the equivalent of QString::fromLocal8Bit().
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
Intel Sweden AB - Registration Number: 556189-6027
Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
Constantin Makshin
2012-06-15 12:12:55 UTC
Permalink
Post by Konstantin Tokarev
Post by Rui Maciel
Does anyone know what's the rationale for relying on Qt's custom QString
instead of simply using C++'s standard and omnipresent std::string?
1. Historical reasons - STL was not implemented on the same level in all compilers
in the past.
2. std::string does not hadle UTF16 strings, and std::wstring is non-standard
3. std::string's behavior (e.g. use of the copy-on-write technique) is
implementation-dependent while QString is the same everywhere.
4. QString has more features (formatting, regular expressions, cheap
substring extraction through QStringRef, etc.).
Konstantin Tokarev
2012-06-15 12:16:55 UTC
Permalink
Post by Constantin Makshin
 Does anyone know what's the rationale for relying on Qt's custom QString
 instead of simply using C++'s standard and omnipresent std::string?
 1. Historical reasons - STL was not implemented on the same level in all compilers
 in the past.
 2. std::string does not hadle UTF16 strings, and std::wstring is non-standard
3. std::string's behavior (e.g. use of the copy-on-write technique) is
implementation-dependent while QString is the same everywhere.
4. QString has more features (formatting, regular expressions, cheap
substring extraction through QStringRef, etc.).
Note that (4) on its own doesn't require new implementation of string
--
Regards,
Konstantin
Thiago Macieira
2012-06-15 12:58:22 UTC
Permalink
Post by Constantin Makshin
Post by Konstantin Tokarev
Post by Rui Maciel
Does anyone know what's the rationale for relying on Qt's custom QString
instead of simply using C++'s standard and omnipresent std::string?
1. Historical reasons - STL was not implemented on the same level in all
compilers in the past.
2. std::string does not hadle UTF16 strings, and std::wstring is non-standard
3. std::string's behavior (e.g. use of the copy-on-write technique) is
implementation-dependent while QString is the same everywhere.
C++11 bans that. C++11 says that std::string must not be refcounted.
Post by Constantin Makshin
4. QString has more features (formatting, regular expressions, cheap
substring extraction through QStringRef, etc.).
Any one care to give me the Standard Library equivalent of:

QString::number(x)
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
Intel Sweden AB - Registration Number: 556189-6027
Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
Sven Anderson
2012-06-15 13:21:25 UTC
Permalink
Post by Thiago Macieira
Post by Constantin Makshin
3. std::string's behavior (e.g. use of the copy-on-write technique) is
implementation-dependent while QString is the same everywhere.
C++11 bans that. C++11 says that std::string must not be refcounted.
Honestly? I'm confused... Is there any copy-on-write alternative in the
standard then?

Sven
Sven Anderson
2012-06-15 13:35:54 UTC
Permalink
Post by Thiago Macieira
QString::number(x)
string to_string(int) ?


Sven
Giuseppe D'Angelo
2012-06-15 13:50:34 UTC
Permalink
Post by Sven Anderson
      QString::number(x)
string to_string(int) ?
No go, C++11 only.
--
Giuseppe D'Angelo
Rui Maciel
2012-06-15 14:10:38 UTC
Permalink
Post by Giuseppe D'Angelo
Post by Sven Anderson
string to_string(int) ?
No go, C++11 only.
But it's standard and it is C++.


Rui Maciel
Giuseppe D'Angelo
2012-06-15 14:13:43 UTC
Permalink
Post by Rui Maciel
Post by Giuseppe D'Angelo
 string to_string(int) ?
No go, C++11 only.
But it's standard and it is C++.
But (I think) the point was: what should have we used for the last
10-15 years of QString?
--
Giuseppe D'Angelo
Rui Maciel
2012-06-15 14:39:06 UTC
Permalink
Post by Giuseppe D'Angelo
Post by Rui Maciel
But it's standard and it is C++.
But (I think) the point was: what should have we used for the last
10-15 years of QString?
I could've been a bit clearer in my initial post, but I intended to know
if there was currently any reason that justified having QString around
instead of simply using what's already included in C++'s standard library.


Rui Maciel
John Layt
2012-06-15 15:20:28 UTC
Permalink
Post by Rui Maciel
Post by Giuseppe D'Angelo
 But it's standard and it is C++.
But (I think) the point was: what should have we used for the last
10-15 years of QString?
I could've been a bit clearer in my initial post, but I intended to know
if there was currently any reason that justified having QString around
instead of simply using what's already included in C++'s standard library.
Besides all the technical reasons given? Backwards compatibility to
existing code-bases. There's millions upon millions of lines of Qt
code out there using QString, do you want to tell everyone that to
port to Qt5 they must use C++11 and change all their code to use
std_string?

John.
Konstantin Tokarev
2012-06-15 14:18:59 UTC
Permalink
Post by Giuseppe D'Angelo
       QString::number(x)
 string to_string(int) ?
No go, C++11 only.
#if NO_CXX11_AVAILABLE
std::string to_string(int x)
{
std::static_cast<std::ostringstream*>( &(std::ostringstream() << x ) )->str();
}
#endif
--
Regards,
Konstantin
Jonas Gehring
2012-06-15 17:48:26 UTC
Permalink
Post by Konstantin Tokarev
Post by Giuseppe D'Angelo
Post by Sven Anderson
Post by Thiago Macieira
QString::number(x)
string to_string(int) ?
No go, C++11 only.
#if NO_CXX11_AVAILABLE
std::string to_string(int x)
{
std::static_cast<std::ostringstream*>( &(std::ostringstream() << x ) )->str();
}
#endif
It works, but it's terribly slow: sprintf is 5 times faster on my
system. Benchmark is at https://gist.github.com/2937802.

Chhers,
Jonas
Konstantin Tokarev
2012-06-15 13:46:37 UTC
Permalink
        QString::number(x)
static_cast<ostringstream*>( &(ostringstream() << x ) )->str();
--
Regards,
Konstantin
Paul Miller
2012-06-15 14:19:00 UTC
Permalink
Post by Thiago Macieira
QString::number(x)
static_cast<ostringstream*>(&(ostringstream()<< x ) )->str();
I just threw up a little in my mouth.

I'll take QString::number(x), thank you.
Till Oliver Knoll
2012-06-15 15:06:36 UTC
Permalink
Post by Paul Miller
...
         QString::number(x)
static_cast<ostringstream*>(&(ostringstream()<<  x ) )->str();
I just threw up a little in my mouth.
I'll take QString::number(x), thank you.
Hehe, thanks for the chuckle, I was just about to write a similar story ;)

In fact, I'll prefer anytime the Qt equivalent to any << c++11<cast
foo>(_std_api).STL_there_is<<42_because&(it'\\s_easier_to_read (same
goes for boost - sorry), even if I loose 10% of performance, but gain
just 11% of readability and ease of use!

Cheers, Oliver
Thiago Macieira
2012-06-15 14:29:22 UTC
Permalink
Post by Konstantin Tokarev
Post by Thiago Macieira
QString::number(x)
static_cast<ostringstream*>( &(ostringstream() << x ) )->str();
Don't forget the #include, which is <sstream> not <stringstream>.

Last time I tried this, it took me a few minutes to figure out what I had done
wrong, then find on the internet what the header name was.

(last weekend, while porting Synergy to IPv6)
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
Intel Sweden AB - Registration Number: 556189-6027
Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
Helbrass
2012-06-15 17:09:03 UTC
Permalink
Post by Rui Maciel
Post by Giuseppe D'Angelo
Post by Rui Maciel
But it's standard and it is C++.
But (I think) the point was: what should have we used for the last
10-15 years of QString?
I could've been a bit clearer in my initial post, but I intended to know
if there was currently any reason that justified having QString around
instead of simply using what's already included in C++'s standard
library.
Mixing different libraries and standards into single jar quite often ends
up in total mess. And you can just others about their experience of doing
so, starting from the last point here:
http://blog.qt.nokia.com/2010/06/17/how-qt-can-turn-you-into-a-guitar-maestro/
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
Charley Bay
2012-06-15 17:26:18 UTC
Permalink
Post by Rui Maciel
Post by Giuseppe D'Angelo
Post by Rui Maciel
But it's standard and it is C++.
But (I think) the point was: what should have we used for the last
10-15 years of QString?
I could've been a bit clearer in my initial post, but I intended to know
if there was currently any reason that justified having QString around
instead of simply using what's already included in C++'s standard
library.
The thread has talked about historic reasons, including support of UTF-16,
and historic non-standard availability of STL, how QString is copy-on-write
(explicitly not allowed by std::string), and how "wide-string" is not
UTF-16.

These are rational, but since they are "historic", one could argue they
avoid the central question of, "Why use QString going forward?"

I *really* want to get back to "Item-Four", which was "QString expanded
interface" where you can do things (parsing, etc.) that are not in the
"std::string" interface.

IMHO, the std::string interface is absolutely insufficient crap. Any
implementation that crashes with the following:

std::string my_string;
my_string = NULL; // crash??!!

...those developers should be taken-out-back-and-shot. Their bodies
burned. Their names to not be spoken again.

IMHO, I would absolutely never use std::string:

(1) Its interface is too minimal (insufficient)
(2) Its implementation is limited
(3) It does not support real-world-unicode use

That's my venting because for over a decade I never understood why people
thought std::string was an acceptable component. IMHO it's absolutely
useless. And dangerous. I don't care if I'm the only one on the planet
with my conclusion, but IMHO, std::string is
absolutely unusable insufficient crap.

If you remove QString, I'll just wrap the string-class-of-choice into a
"MyString" class that is minimally acceptable to do what "std::string"
should have done.

;-))

--charley
Konstantin Tokarev
2012-06-15 17:30:56 UTC
Permalink
That's my venting because for over a decade I never understood why people thought std::string was an acceptable component.  IMHO it's absolutely useless.  And dangerous.  I don't care if I'm the only one on the planet with my conclusion, but IMHO, std::string is absolutely unusable insufficient crap.
Well, when compared with char *, std::string readily becomes acceptable, useful, and safe ;)
--
Regards,
Konstantin
Alex Strickland
2012-06-16 13:06:05 UTC
Permalink
Post by Charley Bay
(1) Its interface is too minimal (insufficient)
(2) Its implementation is limited
(3) It does not support real-world-unicode use
That's my venting because for over a decade I never understood why
people thought std::string was an acceptable component. IMHO it's
absolutely useless. And dangerous. I don't care if I'm the only one on
the planet with my conclusion, but IMHO, std::string is
absolutely unusable insufficient crap.
I enjoyed this article: http://www.gotw.ca/gotw/084.htm

Herb Sutter's not too thrilled with it, but iirc the interface being
minimal isn't one of the reasons :)
--
Regards
Alex
Charley Bay
2012-06-16 13:56:22 UTC
Permalink
Post by Alex Strickland
Post by Charley Bay
(1) Its interface is too minimal (insufficient)
(2) Its implementation is limited
(3) It does not support real-world-unicode use
That's my venting because for over a decade I never understood why
people thought std::string was an acceptable component. IMHO it's
absolutely useless. And dangerous. I don't care if I'm the only one on
the planet with my conclusion, but IMHO, std::string is
absolutely unusable insufficient crap.
I enjoyed this article: http://www.gotw.ca/gotw/084.htm
Herb Sutter's not too thrilled with it, but iirc the interface being
minimal isn't one of the reasons :)
That's a good read -- thanks!

My summary for those not wanting to RTFA (please feel free to correct me):

"Monolithic designs create complex classes that do less, not more;
sometimes member functions should be non-friend, non-member functions to
enable "logic-reuse" and "logic-extensibility"; Lookie here, "std::string"
is a good example of a monolithic class that is not-well-thought-out for
various reasons."

I admit "string" is a (somewhat) "hard problem". The concept of "string"
is:

- is ubiquitous for all systems (i.e., "key-abstraction")
- is "kind-of" a container, but not really
- is legitimately a class (requiring things like memory management,
constructors/destructors, overloaded operators, basic
accessors/manipulators)
- is legitimately a library (TONS of manipulators, search-and-replace,
accessors, etc., are required), including both "universally-understood" and
"domain-specific" library needs (e.g., advanced
"regular-expression-matching" could be considered "domain-specific", as
there are different dialects)
- implies algorithms that SHOULD be "reusable" (e.g., among
UTF-8/UTF-16/UTF-32, fixed-width or MBCS, and application-specific types
that are "like-strings" but with application-specific types, etc.)

My opinion is that "std::string" did both wrong: It's not minimal-enough
(e.g., they could have put the "heavy-lifting" into libraries), and it's
not complete-enough (it's not "useful-enough" on its own). It could have
gone to either end of the spectrum, but it chose to stand in the middle of
the road, where it will get hit by cars driving in both directions.

Our systems use both QString (it's "strong" by itself and offers great
Unicode support), and "MyCustomString" (extends functionality specific to
our needs, including *lots* of parsing). In part, we could **NEVER** use
"std::string" because there is no mechanism to extend functionality in a
reasonable way (that is not part of its current design, and we can't wait
years for a couple new API functions to show up in the "standard"). Any
APIs passing around "std::string&" are highly future-limited (e.g., not
"future-proof" enough for us).

Heck, even forcing me to decide if my API should pass a "std::string&" or
"std::wstring&" seems really stupid to me (I should not have to decide that
now, because not matter what I select, it will absolutely be wrong later.)
The proper answer is to "wrap" the decision in a "MyString" class that
handles such details so I can have a stable API. But, such is not the
belief of "The Committee".

But, quite seriously, "TheString" is absolutely a key abstraction. In any
system. That means, "Upon This Rock I Shall Build My System." I
absolutely cannot use a component that will seg-fault/core-dump when its
public API is exercised in a reasonable way (such as when assigning it a
"char*" value, that later turned out to accidentally be NULL, which happens
all the time, across module boundaries and interfacing with legacy
libraries, which is pretty much every system on Earth that uses "char*" as
a data type.) This is an absolutely (trivially) avoidable problem with a
reasonable implementation THAT THEY CHOSE TO NOT CENTRALIZE. It's bat-sh*t
INSANE to assume every application-specific use, and every programmer at
ten-minutes-till-5pm-on-Friday will merely do-the-extra-stupid-work to wrap
all operations with an "if(...)".

--charley
3***@verizon.net
2012-06-15 19:31:26 UTC
Permalink
<div style="FONT-FAMILY: Arial; COLOR: #000000; FONT-SIZE: 12px">I know C+11 is not available everywhere but they did work on lexical casting:<br />string to_string(int val);<br />string to_string(unsigned val);<br />string to_string(long val);<br />string to_string(unsigned long val);<br />string to_string(long long val);<br />string to_string(unsigned long long val);<br />string to_string(float val);<br />string to_string(double val);<br />string to_string(long double val);<br /><br />And similarly for wstring.&nbsp; They also have conversions in the other way: stoi, etc.<br /><br />Here's hoping the upgrade at least the standard library a LOT faster going forward.<br /><br /></div>
Thiago Macieira
2012-06-15 21:27:20 UTC
Permalink
Here&aps;s hoping the upgrade at least the standard library a LOT faster
going forward.<br /><br /></div>
Great! Now maybe in C++15 or 16 we'll be able to convert strings from the
local 8-bit codec to Unicode without using <clocale>, mbstowcs and managing
buffers manually.

And then we'll be able to use them by 2020.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
Intel Sweden AB - Registration Number: 556189-6027
Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
André Pönitz
2012-06-15 21:05:00 UTC
Permalink
Post by Rui Maciel
Does anyone know what's the rationale for relying on Qt's custom QString
instead of simply using C++'s standard and omnipresent std::string?
std::string is closer to QByteArray than to QString, so you are
probably not asking the question that you might want to ask.

Anyway, "convenience" is one reason.

Andre'
Michael Seydl
2012-06-16 14:45:28 UTC
Permalink
I'd say one reason is the encoding awareness of QString alone is a good reason. Fiddling around with libicu and alike is a mess. Regarding the int to string thing. Who codes C++ without boost nowadays? boost::lexical_cast ftw.

Greetz,
Mike
Post by Rui Maciel
Does anyone know what's the rationale for relying on Qt's custom QString
instead of simply using C++'s standard and omnipresent std::string?
Thanks in advance,
Rui Maciel
_______________________________________________
Interest mailing list
http://lists.qt-project.org/mailman/listinfo/interest
Constantin Makshin
2012-06-16 14:53:55 UTC
Permalink
More people than you might think. ;)
Post by Michael Seydl
Who codes C++ without boost nowadays?
w***@gmx.de
2012-06-16 14:50:34 UTC
Permalink
Post by Michael Seydl
Who codes C++ without boost
nowadays? boost::lexical_cast ftw.
I use both, but usually don't mix. Why should I use boost in
a Qt project? If boost does not provide anything I need,
which I cannot get from Qt?

Guido
Michael Seydl
2012-06-16 15:39:27 UTC
Permalink
Nobody forces you to. Due to naming conflicts of slots and signals moc including boost can be quite a hassle. What I tried to say is std::string needs enhancement when QString is not available and that one good stable possibility is boost.

Personally I used boost::bind and boost::function even in Qt projects sometimes, but that's just my odd preference in the light of slots and meta object method invocation.

Greets,
Mike
Post by w***@gmx.de
Post by Michael Seydl
Who codes C++ without boost
nowadays? boost::lexical_cast ftw.
I use both, but usually don't mix. Why should I use boost in
a Qt project? If boost does not provide anything I need,
which I cannot get from Qt?
Guido
Boudewijn Rempt
2012-06-16 15:22:40 UTC
Permalink
Post by Michael Seydl
I'd say one reason is the encoding awareness of QString alone is a good reason. Fiddling around with libicu and alike is a mess. Regarding the int to string thing. Who codes C++ without boost nowadays? boost::lexical_cast ftw.
I actually don't know anyone directly who codes C++ _with_ boost.
--
Boudewijn Rempt
http://www.valdyas.org, http://www.krita.org, http://www.boudewijnrempt.nl
Michael Seydl
2012-06-16 15:38:03 UTC
Permalink
When there's no Qt I definitely would use boost. It's header only ... mostly ... very portable and provides everything one could need. Asio, regex, filesystem, spirit ... But that's the Qt mailing list don't wanna make advertisement for another library here. ;)

Sent from my iPhone
Post by Boudewijn Rempt
Post by Michael Seydl
I'd say one reason is the encoding awareness of QString alone is a good reason. Fiddling around with libicu and alike is a mess. Regarding the int to string thing. Who codes C++ without boost nowadays? boost::lexical_cast ftw.
I actually don't know anyone directly who codes C++ _with_ boost.
--
Boudewijn Rempt
http://www.valdyas.org, http://www.krita.org, http://www.boudewijnrempt.nl
_______________________________________________
Interest mailing list
http://lists.qt-project.org/mailman/listinfo/interest
Boudewijn Rempt
2012-06-16 16:23:37 UTC
Permalink
Post by Michael Seydl
When there's no Qt I definitely would use boost. It's header only ... mostly ... very portable and provides everything one could need. Asio, regex, filesystem, spirit ... But that's the Qt mailing list don't wanna make advertisement for another library here. ;)
If there were no Qt, yeah... I guess I would use -- Wait. I think I'd open a second-hand bookshop or something like that. I'd probably stop coding.
--
Boudewijn Rempt
http://www.valdyas.org, http://www.krita.org, http://www.boudewijnrempt.nl
w***@gmx.de
2012-06-16 16:50:14 UTC
Permalink
Post by Boudewijn Rempt
I actually don't know anyone directly who codes C++ _with_ boost.
I use boost when it is non-graphical stuff and the LGPL is not
good enough.

Guido

Loading...