Thread: C++/Java/C#

  1. #46
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Quote Originally Posted by Elysia View Post
    Umm, are you missing that MSVC6 is not very standards compliant?
    For example, pointers to member class functions were not fixed until 2005.
    (Or maybe it's that the compiler is missing a lot of stuff, like partial template specializations.)
    But most of that should only affect if you want to downgrade to VC++ 6.0. Upgrading should be pretty backwards compatible.

  2. #47
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Well, as I mentioned, VC2005 breaks a lot of stuff from earlier versions because it's more strict and standards compliant.
    Class member functions is only one example of where it will break existing code.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #48
    Registered User
    Join Date
    Nov 2006
    Posts
    519
    Quote Originally Posted by cpjust View Post
    I would still avoid using non-primitive types across modules though, because if you apply any compiler service packs, or even change some compile settings and then fix a bug in one of your DLL's and release a patch to customers, the ABI might not be compattible anymore.
    Why not just update all modules in an atomic manner, after compiler/ SP/ settings changed?
    Of course, this is not doable in all circumstances. So I think the rule to avoid complex types in interfaces is a bit strict and should be only applied if the project type demands it.

    For example, for lot of projects my company specifies whole buildings, containing computers, containing OS and modules (built only by us) Never will there be a situation there we need to upgrade single components build with a different compiler or something similar.

  4. #49
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Necessarily the advice needs to be taken with a grain of salt. The notion that "just because it may happen one day" is not always (rarely is from a business perspective) a good argument.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #50
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    Do the rest agree that C++ has the best libraries? Or in any case very good ones?

    Also, does it has good libraries for making a GUI compared to the others?

    Generally, in which fields each of the above languages would be A LOT more useful? That would help me choose

  6. #51
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    GUI development in C++ is terror (IMO) and takes like 10x-50x as long to develop compared with say C#. Sure you could get a faster UI in C++ but this is neglectable in 90&#37; of the cases.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  7. #52
    Registered User
    Join Date
    Nov 2006
    Posts
    519
    It depends on the frameworks much more than on the language. Most frameworks have bindings for several languages. What makes it in C# easier to say: "draw a window and put some controls in it" than in c++ in your opinion?
    Using frameworks linke wxw or qt you even don't need to do that. instead just compose the gui with a wysiwyg editor and interface it from your application.

    In general, the only thing which may increase development productivity while using other procedural/OO languages than C++ in my experience is the bundling of extended frameworks together with the compiler/interpreter/ide. In C++ you need to put this together yourself. But that matters only for very small projects (<1 week) I think.
    Other stuff like memory management is just FUD imo. I can't remember more than one or two situations in which I had to deal with it myself. And that was things you just can not do in some other languages at all.
    Last edited by pheres; 06-28-2008 at 05:12 AM.

  8. #53
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Quote Originally Posted by pheres View Post
    Other stuff like memory management is just FUD imo. I can't remember more than one or two situations in which I had to deal with it myself.
    I can't imagine anything but a toy C++ program that wouldn't have to deal with memory management in some fashion. I'm not saying it's hard, it's just necessary and bothersome, whether it's ensuring RAII, using smart pointers, copy/assignment semantics, etc.

  9. #54
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Bothersome? Nonsense, says I.
    Unlike some other languages, C++ makes you carefully think about your design, and memory should be no different.
    It's what makes C++ C++! The language we all love
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #55
    Registered User
    Join Date
    Nov 2006
    Posts
    519
    Quote Originally Posted by medievalelks View Post
    I can't imagine anything but a toy C++ program that wouldn't have to deal with memory management in some fashion. I'm not saying it's hard, it's just necessary and bothersome, whether it's ensuring RAII, using smart pointers, copy/assignment semantics, etc.
    what do you have to think about memory management if you just push your objects into an stl::vector for example any more than say in java?

  11. #56
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    I'm not all too familiar with C#, but I wouldn't dismiss Magos comment on a rush. Drawing from my VB experience, it's undeniable that I could produce complex GUI applications for Windows only in a fraction of the time I can today with C++.

    Languages like C# and VB.Net are tailored to handle these environments. What would be surprising was if they didn't offer rapid application development at a higher satisfaction rate than C++ based libraries, or even MFC based RADs. WxWidgets, for instance offers RAD development through some of the tools you can purchase separately. They are however not nearly as sophisticated as Windows Forms nor they provide the necessary features to extend RAD development to anything but the simplest GUI applications. And definitely, they are too tied to the code to offer a real alternative for complex applications since only a fool would sacrifice functionality for design on this case.

    I base all my wxWidgets application GUI development on the following sub phases. I include also average development times (1, being some unit of time)... Take this with a grain of salt, naturally.

    1 - RAD development of window's controls layout (time: 1)

    2 - Go back to code, alter generated code to conform with code design decisions, trim and optimize the unnecessary bits and provide at least minimum extensibility. (time: 1.5 to 2 or 3 depending on the complexity of the layout).

    It's phase two that most RADs need to concentrate on in order to earn the title. I have only very minimal experience in Windows Forms, having tried it out of curiosity a couple of times while looking at C# features some 12 months ago. But I have many flight hours under wxWidgets (being my current and favorite C++ GUI library), and by no means any of its the RAD tools match real life needs on a scale larger than the simplest applications.

    Despite my obvious bias towards C++ and my obvious preference for wxWidgets, anyone will have an hard time convincing me some C++/Qt/wxWidgets/MFC combination can match the development speeds and the features of C# or VB.Net under Windows Forms.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  12. #57
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Quote Originally Posted by pheres View Post
    what do you have to think about memory management if you just push your objects into an stl::vector for example any more than say in java?
    If you're pushing objects, you have to worry about copy semantics. Maybe that's not memory management per se, but it's a language feature that you always have to be concerned about.

    C++'s power and versatility are indispensable for application domains you really need it for. For others, however, the language tends to get in the way. Just my $0.02.
    Last edited by medievalelks; 06-28-2008 at 11:06 AM.

  13. #58
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    You may to worry a bit more about memory when you do real designs such as memory allocators, functors, etc.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  14. #59
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    "Real" design?

  15. #60
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    It seems logical also to me that newer language offer better libraries/tools. But I would like to know one language for everything. So, considering that I don't know what my feature job will require, do you think I should go for C++ or something newer, like C# or Java?

    What do companies prefer for you to know. Which language is better on what field?

Popular pages Recent additions subscribe to a feed