Re: Garbage collection in C++ | |
Sam wrote: Quote:
C++ has no appropriate use for
garbage collection. If there was one, it would be a part of the
language. But it's not.
How idiotically narrow-minded. With that reasoning, you should never use
any library or code that isn't part of the C++ standard, either. | | | | re: Re: Garbage collection in C++
Matthias Buelow writes: Quote:
Sam wrote: Quote:
>C++ has no appropriate use for
>garbage collection. If there was one, it would be a part of the
>language. But it's not.
How idiotically narrow-minded. With that reasoning, you should never use
any library or code that isn't part of the C++ standard, either.
Not a bad suggestion. With the exception of some platform-specific APIs
(graphics, sound, etc…), I find that third-party libraries often tend to be
poorly designed, and they nearly always just reinvent the same wheel, for no
clear benefit.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEABECAAYFAkkkpDMACgkQx9p3GYHlUOKPDwCfTxElxRTkBl OwNK5m1GQAUK2L
O7YAn2c3al85BXHYWmSutfngA13Slgu8
=kRze
-----END PGP SIGNATURE----- | | | | re: Re: Garbage collection in C++
Sam wrote: Quote:
Matthias Buelow writes:
> Quote:
>Sam wrote:
>> Quote:
>>C++ has no appropriate use for
>>garbage collection. If there was one, it would be a part of the
>>language. But it's not.
>>
>How idiotically narrow-minded. With that reasoning, you should never use
>any library or code that isn't part of the C++ standard, either.
>
Not a bad suggestion. With the exception of some platform-specific APIs
(graphics, sound, etc…), I find that third-party libraries often tend to
be poorly designed, and they nearly always just reinvent the same wheel,
for no clear benefit.
Just to clarify: You don't want to use third-party libraries, because
*they* often re-invent the wheel? If you need to do a Fourier
transform, do you start by taking a refresher course in signal processing? | | | | re: Re: Garbage collection in C++
Jeff Schwab writes: Quote:
Sam wrote: Quote:
>Matthias Buelow writes:
> Quote:
>>Sam wrote:
>>>
>>>C++ has no appropriate use for
>>>garbage collection. If there was one, it would be a part of the
>>>language. But it's not.
>>>
>>How idiotically narrow-minded. With that reasoning, you should never use
>>any library or code that isn't part of the C++ standard, either.
>
>Not a bad suggestion. With the exception of some platform-specific APIs
>(graphics, sound, etc…), I find that third-party libraries often tend to
>be poorly designed, and they nearly always just reinvent the same wheel,
>for no clear benefit.
Just to clarify: You don't want to use third-party libraries, because
*they* often re-invent the wheel? If you need to do a Fourier
transform, do you start by taking a refresher course in signal processing?
No, by reinventing the wheel I mean things like reimplementing a string
class. Yes, I'm looking at you, Qt, and your QString.
Somebody explain why std::string wasn't fscking good enough, for Qt.
That's what I mean, by reinventing the wheel.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEABECAAYFAkkkteYACgkQx9p3GYHlUOIXWACeOnqthKjfls/+rrinZXqTDP8y
cEwAnAm2QS3sG6FdoJ0WS/AHQ6/G8WrV
=+pqA
-----END PGP SIGNATURE----- | | | | re: Re: Garbage collection in C++
Sam wrote: Quote:
Somebody explain why std::string wasn't fscking good enough, for Qt.
Because it doesn't portably support Unicode. QString does. | | | | re: Re: Garbage collection in C++
Jeff Schwab writes: Quote:
Sam wrote: Quote:
>Somebody explain why std::string wasn't fscking good enough, for Qt.
>
Because it doesn't portably support Unicode. QString does.
So does std::wstring
Next.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEABECAAYFAkkk3p4ACgkQx9p3GYHlUOIICACfZsQKfVuTWl 6De18tl5C2WPp5
uEMAnA7zzh6QcNt/XcyyOeA2YR7bVV0F
=PgDB
-----END PGP SIGNATURE----- | | | | re: Re: Garbage collection in C++
On Nov 20, 1:57 am, Sam <s...@email-scan.comwrote: Quote:
Jeff Schwab writes:
No, by reinventing the wheel I mean things like reimplementing
a string class. Yes, I'm looking at you, Qt, and your QString.
Quote:
Somebody explain why std::string wasn't fscking good enough, for Qt.
Maybe because it didn't exist when Qt was written. Quote:
That's what I mean, by reinventing the wheel.
The reason std::string was added to the standard was because
without it, everyone did have to reinvent the wheel. Still, you
can't criticize people for not using something that didn't exist
when they wrote the code.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34 | | | | re: Re: Garbage collection in C++
Jeff Schwab wrote: Not off to a good start there guy. Quote:
>
I'm not particularly a fan of Qt. I've never used wxWidgets, but my
(mis?)understanding is that it's similar to MFC, which I find mildly
distasteful from a technical standpoint. I'm kind of hoping to get
started with gtkmm in the near future.
I would have loved using gtkmm if it wasn't for the fact that our
testing department needs to use the standard naming stuff provided by
the native widgets. | | | | re: Re: Garbage collection in C++
James Kanze writes: Quote:
On Nov 20, 1:57 am, Sam <s...@email-scan.comwrote: Quote:
>Jeff Schwab writes:
>No, by reinventing the wheel I mean things like reimplementing
>a string class. Yes, I'm looking at you, Qt, and your QString.
> Quote:
>Somebody explain why std::string wasn't fscking good enough, for Qt.
>
Maybe because it didn't exist when Qt was written.
> Quote:
>That's what I mean, by reinventing the wheel.
>
The reason std::string was added to the standard was because
without it, everyone did have to reinvent the wheel. Still, you
can't criticize people for not using something that didn't exist
when they wrote the code.
Well, now that the code is written, there's no need to keep this extra
baggage round. Bite the bullet, and rewrite QString into std::string (or
std::wstring).
It's not that hard. I also once wrote a small string class, as well as
a simple set of container classes, before std::string, and STL, was widely
available. Guess what? A few years ago, I went ahead and converted all the
old codebase to std::string, and STL containers.
This is not rocket science.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEABECAAYFAkkl8qkACgkQx9p3GYHlUOLV7QCfc+7Us+EgJK upJq8LskTs0Ojl
fGYAn3eCQRwdYkIl/On0royV/rjqMYfJ
=CtQa
-----END PGP SIGNATURE----- | | | | re: Re: Garbage collection in C++
On Nov 21, 12:28 am, Sam <s...@email-scan.comwrote: Quote:
James Kanze writes: Quote:
On Nov 20, 1:57 am, Sam <s...@email-scan.comwrote: Quote:
Jeff Schwab writes:
The reason std::string was added to the standard was because
without it, everyone did have to reinvent the wheel. Still,
you can't criticize people for not using something that
didn't exist when they wrote the code.
Quote:
Well, now that the code is written, there's no need to keep
this extra baggage round. Bite the bullet, and rewrite QString
into std::string (or std::wstring).
And break all of the existing user code? That would be very
irresponsible. (And of course, std::wstring doesn't support
Unicode.) Quote:
It's not that hard. I also once wrote a small string class, as
well as a simple set of container classes, before std::string,
and STL, was widely available. Guess what? A few years ago, I
went ahead and converted all the old codebase to std::string,
and STL containers.
Fine, if you only have a small code base and your time is free.
It's not the sort of thing a responsible company would impose on
its customers.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34 | | | | re: Re: Garbage collection in C++
On Nov 21, 1:15*pm, Sam <s...@email-scan.comwrote: Quote:
James Kanze writes: Quote:
On Nov 21, 12:28 am, Sam <s...@email-scan.comwrote: Quote:
James Kanze writes:
On Nov 20, 1:57 am, Sam <s...@email-scan.comwrote:
Jeff Schwab writes:
The reason std::string was added to the standard was because
without it, everyone did have to reinvent the wheel. *Still,
you can't criticize people for not using something that
didn't exist when they wrote the code.
Quote: Quote: Quote:
Well, now that the code is written, there's no need to keep
this extra baggage round. Bite the bullet, and rewrite QString
into std::string (or std::wstring).
Quote: Quote:
And break all of the existing user code? *That would be very
irresponsible. *(And of course, std::wstring doesn't support
Unicode.)
Quote:
So what? APIs get broken every time, in free software, on
major releases.
That's probably why a lot of companies shy off free software. Quote:
API breakage is only a problem with non-free software.
No. API breakage is only a problem for people who use the
software. If nobody is using it, then you can change your API
as much as you wish. Quote:
And I don't know when std::wstring stopped "supporting"
Unicode. It supports it very well, as far as I can tell.
Not on my platform.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34 | | | | re: Re: Garbage collection in C++
James Kanze writes: Quote:
On Nov 21, 1:15Â*pm, Sam <s...@email-scan.comwrote: Quote:
>James Kanze writes: Quote:
On Nov 21, 12:28 am, Sam <s...@email-scan.comwrote:
>James Kanze writes:
On Nov 20, 1:57 am, Sam <s...@email-scan.comwrote:
>Jeff Schwab writes:
The reason std::string was added to the standard was because
without it, everyone did have to reinvent the wheel. Â*Still,
you can't criticize people for not using something that
didn't exist when they wrote the code.
Quote: Quote:
>Well, now that the code is written, there's no need to keep
>this extra baggage round. Bite the bullet, and rewrite QString
>into std::string (or std::wstring).
Quote: Quote:
And break all of the existing user code? Â*That would be very
irresponsible. Â*(And of course, std::wstring doesn't support
Unicode.)
Quote:
>So what? APIs get broken every time, in free software, on
>major releases.
That's probably why a lot of companies shy off free software.
And it's better for those companies to do just that. Quote: Quote:
>API breakage is only a problem with non-free software.
No. API breakage is only a problem for people who use the
software. If nobody is using it, then you can change your API
as much as you wish.
Nearly every Linux kernel release changes at least one API. And last time I
checked, it's pretty popular. Quote: Quote:
>And I don't know when std::wstring stopped "supporting"
>Unicode. It supports it very well, as far as I can tell.
Not on my platform.
Well, I don't know what your platform's problem is. Every time I look into a
std::wstring, I don't seem to have much of a problem recognizing, and using,
Unicode strings. Every time I use std::codecvt, or iconv, to convert various
charsets into Unicode strings, stuffing them into a std::wstring, things
seem to work out just fine, for me.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEABECAAYFAkknP5QACgkQx9p3GYHlUOIS7gCbBJFcN8oAf3 GNPw2GkrjodFbV
LOAAnRCUgurtCfaV/b5D9pcFiWLNwUXi
=84eq
-----END PGP SIGNATURE----- |  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,471 network members.
|