Coffeehouse Thread

38 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Why do software companies rely on C++ than C#?

Back to Forum: Coffeehouse
  • User profile image
    Spitfire15

    Seriously, if they want programmers, do they really need to get bogged down in C++? Way too much code to write, than in the more simpler and yet so easier C#. Even if it was for a complete novice, they shouldn't go out learning C++ just to get a job in the software development industry.

    Yes, VBasic can count if you wish. Tongue Out

  • User profile image
    Maurits

    Because C# entails .Net

  • User profile image
    DCMonkey

    Because their code was already written in C++ from a time when C# didn't exist?

  • User profile image
    Wil

    C++ isn't quite portable between platforms, but it's certainly more easily ported than C#, which doesn't run at all under UNIX/Linux (unless you're risking your business on Mono, and no one is at this stage).  Also, features like multiple inheritance and templates do things differently, and in certain cases arguably better, than C#'s features like interfaces and generics.  C++ lets you work with unmanaged code, which most of the code in the world still is.  Native C++ is closer to the metal than C# or other CLI languages that run atop the .Net platform, and in many applications that's important.  Perhaps most importantly, it's not a purely O-O language.  The "C" substrate is right there, so you can mix procedural and O-O coding.  Every function is not a polymorphic method!

  • User profile image
    Cairo

    C++ is fast, portable and established. C# is none of those things.

  • User profile image
    leighsword

    Cairo wrote:
    C++ is fast, portable and established. C# is none of those things.

    managed code is easy to decomplie, and there are no core tech can be hided or protected.

  • User profile image
    Spitfire15

    Maurits wrote:
    Because C# entails .Net


    Doesn't C++ use .NET?

  • User profile image
    Tom Servo

    No, unless you code Managed C++ or C++/CLI.

  • User profile image
    imekon

    Is C# on PS2? GameCube? Linux? UNIX?

    Can I write device drivers on Windows in C#?

    Why should I rewrite something written in C++ that took man-years to create into a new language like C#?

  • User profile image
    eagle

    This forum application is written in C#......

  • User profile image
    footballism

    Just wait guys, your investment in .Net will be paid off really well down the road:)
    Just be patient!

  • User profile image
    Aerodyne

    Because we are all good developers & know what to learn and use... be it managed code or assembly intermixed with C++ just to get that extra tweak or save time (w/ managed).
    (If your starting out I can see where you'd get confused & frustrated Wink )

    There are reasons why you'd use C++ over Java/C#/VB & vice versa...etc:
    - depends on your systems enviroment
    - project capital & budget
    - capable resoureses & talent
    - application in question
    - platforms to deploy to (servers, embeded, real time ...etc)
    - what do you prefer (i.e. which lang your most comfortable w/)
    - ...etc.

    Plus many (large) companies now have C++ & Java programmers... & those who are in web service dev and used ASP are migrating to .NET because of extra features and it'll be updated.

    All in all... learn what you want, but for me I'l rather have C++ under my belt as well because I know where and when to use it.

    Regards.

  • User profile image
    Manip

    C++ compiled code generally starts off slower than its managed equivalent. It is also more time consuming and more likely to contain obscure bugs. HOWEVER, after both the C++ and managed solutions are optimised C++ can be an order of magnitude faster than the managed version with no real limit set on the amount of optimisation you can do (up until ASM).

  • User profile image
    figuerres

    Spitfire15 wrote:
    Seriously, if they want programmers, do they really need to get bogged down in C++? Way too much code to write, than in the more simpler and yet so easier C#. Even if it was for a complete novice, they shouldn't go out learning C++ just to get a job in the software development industry.

    Yes, VBasic can count if you wish.


    C and C++ have been around for a LONG TIME

    C# and .Net are the "New kids on the block"

    any business that has 5-20 years of code in C and C++ is hardly going to jump from one codebase to another in just 3-5 years.

    they would be crazy to even try.

    so this will take time.

    also several replies I saw are just wrong, wrong, wrong....

    but I don't have time right now to explain them all...

    but .net is not slow, yes you do need to install .net just like you need to install support for any other new tech -- Java has it's stuff C-RUntime has less
    VB6 has it's dll YMMV.

    our perpetual lady of decompilation made her jab.
    she is paranoid.

    give it time....

    and yes some things are just not what .net is about.
    most of the base-os needs C and C++ to boot and have drivers.
    no good reason to try and force them to convert -- YET...

  • User profile image
    blowdart

    The time has come for a serious discussion on whether or not to continue using C and C++ for serious programming projects. As I will explain, I feel that C needs to be retired, much the same way that Fortran, Cobol and Perl have been. Furthermore, allow me to be so bold as to suggest a superior replacement to this outdated language.

    To give you a little background on this subject, I was recently asked to develop a client/server project on a Unix platform for a Fortune 500 company. While I've never coded in C before I have coded in flash for fifteen years, and in Java for over ten, I was stunned to see how poorly C fared compared to these two, more low-level languages.

    C's biggest difficulty, as we all know, is the fact that it is by far one of the slowest languages in existance, especially when compared to more modern languages such as Java and FLASH. Although the reasons for this are varied, the main reasons seems to be the way C requires a programmer to laboriously work with chunks of memory.

    Requiring a programmer to manipulate blocks of memory is a tedious way to program. This was satisfactory back in the early days of coding, but then again, so were punchcards. By using what are called "pointers" a C programmer is basically requiring the computer to do three sets of work rather than one. The first time requires the computer to duplicate whatever is stored in the memory space "pointed to" by the pointer. The second time requires it to perform the needed operation on this space. Finally the computer must delete the duplicate set and set the values of the original accordingly.

    Clearly this is a horrendous use of resources and the chief reason why C is so slow. When one looks at a more modern (and a more serious) programming language like Java, C# or - even better - Flash that lacks such archaic coding styles, one will also note a serious speed increase over C.

    So what does this mean for the programming community? I think clearly that C needs to be abandonded. There are two candidates that would be a suitable replacement for it. Those are Java and Flash.

    Having programmed in both for many years, I believe that flash has the edge. Not only is it slightly faster than Java its also much easier to code in. I found C to be confusing, frightening and intimidating with its non-GUI-based coding style. Furthermore, I like to see the source code of the projects I work with. Java's source seems to be under the monopolistic thumb of Sun much the way that GCC is obscured from us by the marketing people at the FSF. Macromedia's "shared source" under which Flash is released definately seems to be the most fair and reasonable of all the licenses in existance, with none of the harsh restrictions of the BSD license. It also lacks the GPLs requirement that anything coded with its tools becomes property of the FSF.

    I hope to see a switch from C to flash very soon. I've already spoken with various luminaries in the C coding world and most are eager to begin to transition. Having just gotten off the phone with Mr. Alan Cox, I can say that he is quite thrilled with the speed increases that will occur when the Linux kernel is completely rewritten in Flash . Richard Stallman plans to support this, and hopes that the great Swede himself, Linux Torvaldis, won't object to renaming Linux to flash/Linux. Although not a C coder himself, I'm told that Slashdot's very own Admiral Taco will support this on his web site. Finally, Dennis Ritchie is excited about the switch!

    Thank you for your time. Happy coding.

  • User profile image
    Tensor

    figuerres wrote:
    our perpetual lady of decompilation


    LOL Best title evar!

  • User profile image
    Spitfire15

    Aerodyne wrote:
    Because we are all good developers & know what to learn and use... be it managed code or assembly intermixed with C++ just to get that extra tweak or save time (w/ managed).
    (If your starting out I can see where you'd get confused & frustrated )

    There are reasons why you'd use C++ over Java/C#/VB & vice versa...etc:
    - depends on your systems enviroment
    - project capital & budget
    - capable resoureses & talent
    - application in question
    - platforms to deploy to (servers, embeded, real time ...etc)
    - what do you prefer (i.e. which lang your most comfortable w/)
    - ...etc.

    Plus many (large) companies now have C++ & Java programmers... & those who are in web service dev and used ASP are migrating to .NET because of extra features and it'll be updated.

    All in all... learn what you want, but for me I'l rather have C++ under my belt as well because I know where and when to use it.

    Regards.


    I thought most languages are to deploy in real time and such. I could say that C# is the more simpler version to C++.

  • User profile image
    Deactivated User

    Comment removed at user's request.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.