Re: Garbage collection in C++

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matthias Buelow

    Re: Garbage collection in C++

    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.
  • Sam

    #2
    Re: Garbage collection in C++

    Matthias Buelow writes:
    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.



    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (GNU/Linux)

    iEYEABECAAYFAkk kpDMACgkQx9p3GY HlUOKPDwCfTxElx RTkBlOwNK5m1GQA UK2L
    O7YAn2c3al85BXH YWmSutfngA13Slg u8
    =kRze
    -----END PGP SIGNATURE-----

    Comment

    • Jeff Schwab

      #3
      Re: Garbage collection in C++

      Sam wrote:
      Matthias Buelow writes:
      >
      >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?

      Comment

      • Sam

        #4
        Re: Garbage collection in C++

        Jeff Schwab writes:
        Sam wrote:
        >Matthias Buelow writes:
        >
        >>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)

        iEYEABECAAYFAkk kteYACgkQx9p3GY HlUOIXWACeOnqth Kjfls/+rrinZXqTDP8y
        cEwAnAm2QS3sG6F doJ0WS/AHQ6/G8WrV
        =+pqA
        -----END PGP SIGNATURE-----

        Comment

        • Jeff Schwab

          #5
          Re: Garbage collection in C++

          Sam wrote:
          Somebody explain why std::string wasn't fscking good enough, for Qt.
          Because it doesn't portably support Unicode. QString does.

          Comment

          • Sam

            #6
            Re: Garbage collection in C++

            Jeff Schwab writes:
            Sam wrote:
            >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)

            iEYEABECAAYFAkk k3p4ACgkQx9p3GY HlUOIICACfZsQKf VuTWl6De18tl5C2 WPp5
            uEMAnA7zzh6QcNt/XcyyOeA2YR7bVV0 F
            =PgDB
            -----END PGP SIGNATURE-----

            Comment

            • James Kanze

              #7
              Re: Garbage collection in C++

              On Nov 20, 1:57 am, Sam <s...@email-scan.comwrote:
              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.
              Somebody explain why std::string wasn't fscking good enough, for Qt.
              Maybe because it didn't exist when Qt was written.
              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.kan ze@gmail.com
              Conseils en informatique orientée objet/
              Beratung in objektorientier ter Datenverarbeitu ng
              9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

              Comment

              • Noah Roberts

                #8
                Re: Garbage collection in C++

                Jeff Schwab wrote:
                s/it's/its/
                Not off to a good start there guy.
                >
                I'm not particularly a fan of Qt. I've never used wxWidgets, but my
                (mis?)understan ding 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.

                Comment

                • Sam

                  #9
                  Re: Garbage collection in C++

                  James Kanze writes:
                  On Nov 20, 1:57 am, Sam <s...@email-scan.comwrote:
                  >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.
                  >
                  >Somebody explain why std::string wasn't fscking good enough, for Qt.
                  >
                  Maybe because it didn't exist when Qt was written.
                  >
                  >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)

                  iEYEABECAAYFAkk l8qkACgkQx9p3GY HlUOLV7QCfc+7Us +EgJKupJq8LskTs 0Ojl
                  fGYAn3eCQRwdYkI l/On0royV/rjqMYfJ
                  =CtQa
                  -----END PGP SIGNATURE-----

                  Comment

                  • James Kanze

                    #10
                    Re: Garbage collection in C++

                    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.
                    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.)
                    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.kan ze@gmail.com
                    Conseils en informatique orientée objet/
                    Beratung in objektorientier ter Datenverarbeitu ng
                    9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

                    Comment

                    • James Kanze

                      #11
                      Re: Garbage collection in C++

                      On Nov 21, 1:15 pm, Sam <s...@email-scan.comwrote:
                      James Kanze writes:
                      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.
                      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.)
                      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.
                      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.
                      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.kan ze@gmail.com
                      Conseils en informatique orientée objet/
                      Beratung in objektorientier ter Datenverarbeitu ng
                      9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

                      Comment

                      • Sam

                        #12
                        Re: Garbage collection in C++

                        James Kanze writes:
                        On Nov 21, 1:15 pm, Sam <s...@email-scan.comwrote:
                        >James Kanze writes:
                        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.
                        >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.)
                        >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.
                        >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.
                        >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)

                        iEYEABECAAYFAkk nP5QACgkQx9p3GY HlUOIS7gCbBJFcN 8oAf3GNPw2Gkrjo dFbV
                        LOAAnRCUgurtCfa V/b5D9pcFiWLNwUXi
                        =84eq
                        -----END PGP SIGNATURE-----

                        Comment

                        Working...