Results 1 to 13 of 13

Thread: C++ Defence

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2008
    Posts
    37
    Thanked 2 Times in 2 Posts

    Default Re: C++ Defence

    STL has many implementations and has been probably reimplemented a couple of times on a number of platforms during years, so its quality has greatly increased. At the beginning it was indeed slow, especially std::string. You have some ropes there and probably other classes that work faster for particular purposes so there is a way to overcome that. But your friend's opinion could have been based on the state of the art that was two years back.
    True. I can't remember what specifically in his application he was complaining about - but I remember be a bit confused at how it could possibly be slow. I think it was a mail sorting application (as in snail mail). They used a lot of MFC, so it could be that he was comparing std::string against MFC's string class. Which to be fair - was probably faster than std::string at the time.

    Let's face it though - there are plenty of things that are easier to do in Java than in C++ Probably not because of the language itself (though that's probably true as well) but because of the whole code library that is available "out there".
    Right, but to echo some sentiments from the "discipline" argument, it seems to depend on how used to it you are. I find every time I have to do Java, I always end up making a "C++ mistake" in it. I don't think I'm alone in that.

  2. #2
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 74 Times in 54 Posts

    Default Re: C++ Defence

    The old-school Unix hackers (like Eric) are biased, because there were no decent C++ compilers for Unix for a long period. It was considered a "Windows" language, and many hackers refused to use it.

    C++ is a common, general purpose, mid-level, native code, object oriented language. There is no other language to replace it. All others are either obscure, specific, high level, require runtime environments, or aren't object oriented. This doesn't mean other languages are bad, it means that they cannot fill the role of C++.

  3. #3
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 74 Times in 54 Posts

    Default Re: C++ Defence

    I've finally read through the comments at ESR's site. Once I got past the language bigots, the pontificators, and the trolls, the complaints against C++ seemed to be that it's complicated.

    Yes, C++ is complicated. It may be the world's most complicated language (even beyond Ada in some respects). It doesn't help that many C++ "purists' advocate the complexity. That's why I like Qt, it keeps the C++ simple. Nearly everything has an ordinary OO structure. Templates are only used where necesssary, and only in a straightforward way. Compare Qt's signals/slots with Boost Signals, for example, and it's night and day. Or consider that Qt does not throw exceptions to the user. The purists will decry this, but while being easy to learn they can be very difficult to use in practice.

    The only real contender for C++'s niche is Python. (I won't risk a flamewar by saying why I don't think Java qualifies). That's why Python is on my list of things to learn when I get the time. But just last Monday I was listening to a Python developer rant on about how his language was too high-level to give him the level of control he needed.

    Combined with Qt, I can think of no other language I would rather use for desktop application development than C++.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: C++ Defence

    Quote Originally Posted by Brandybuck View Post
    Yes, C++ is complicated. It may be the world's most complicated language (even beyond Ada in some respects).
    More than Lisp? Yeah, I know the language itself is easy, but parenthesis might kill you...

    That's why I like Qt, it keeps the C++ simple. Nearly everything has an ordinary OO structure. Templates are only used where necesssary, and only in a straightforward way.
    Good point. A nice follow-up to this statement is the article in Qt Quartely by Matthias Ettrich: http://doc.trolltech.com/qq/qq13-apis.html

    Combined with Qt, I can think of no other language I would rather use for desktop application development than C++.
    Python+Qt is a nice combination as well

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.