View Poll Results: Which do you prefer to program in?

Voters
39. You may not vote on this poll
  • C

    11 28.21%
  • C++

    17 43.59%
  • Both

    11 28.21%

Thread: C or C++

  1. #31
    junior member mix0matt's Avatar
    Join Date
    Aug 2001
    Posts
    144
    <This is not the language, it's the programmer. If the programmer write efficient code, then the program runs fast. If he doesn't, well then it won't run fast or how you want it to. This has nothing to do with the language.>

    yeah, that' s pretty much what i was trying to say. Maybe i was unclear. Those who still hold on to C-style code often say that C++ is bloated and slow. That C holds the real "muscle". I was simply saying that this was not correct. As you correctly point out, the programmer impacts the speed and size of the code far more than the choice between C and C++. C++'s obvious benefits outweigh the insignificant performance issues.
    THIS IS NOT JUST A CHRONICLING OF THINGS WE HAVE DONE IN THE PAST BUT OUR RISE TO POWER.

  2. #32
    C > C++ duders ggs's Avatar
    Join Date
    Aug 2001
    Posts
    435
    obvious benefits?

    c can do most of the things c++ does just as well creating an executable that will at least match the speed of the c++ equivalent

    a lot of the stuff you use in c++ you don't really need...
    .sect signature

  3. #33
    junior member mix0matt's Avatar
    Join Date
    Aug 2001
    Posts
    144
    <a lot of the stuff you use in c++ you don't really need...>

    I need all the stuff I use in C++. Your response pretty much proves my point. Those who defend C by saying the added tools in C++ are pointless don't really understand Object Orientation. They simply see as a useless obsticle--something else to learn.
    I don't know what they're doing in Canada, but in the US (form what i'm told in school anyway) a majority of Software Engineering utilizes OOD&P which is the "useless" stuff C++ adds to C.
    THIS IS NOT JUST A CHRONICLING OF THINGS WE HAVE DONE IN THE PAST BUT OUR RISE TO POWER.

  4. #34
    C > C++ duders ggs's Avatar
    Join Date
    Aug 2001
    Posts
    435
    I've learned a bit about oop. Certainly useful for data containers. Inheritence of all types looks complex and useful when seen in source files.

    Given that it can sometimes be nice to drop in, for example, an HTTP_PI object into your code to give instant http protocol interpretation, and it will look good, but really it's a choice of using functions as arguments to data and using data as functions of arguments, if you see what I'm saying...

    http_pi inst;
    inst.interpret(request);

    vs.

    http_pi inst;
    http_pi_init(&inst);
    http_interpret(&inst, request);

    the top is shorter and the code sort of directly translates to how things would work in the ideal world (dropping objects into bins to make programs :/), I prefer the bottom in a lot of cases because then I see *everything* that happens, I know how every bit works and everything is coming together.

    And how do you replicate the kind of neat stuff that dup2 and fork() have to offer with streams, eh?
    .sect signature

  5. #35
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    a lot of the stuff you use in c++ you don't really need...
    You don't have to use it, but with C++ you've got the option.

    I prefer the bottom in a lot of cases because then I see *everything* that happens, I know how every bit works and everything is coming together.
    If you wrote the http_pi class then you would, but if it was part of a third party library then you've no need to know exactly how it works. If you were using a third party c library you probably wouldn't know what was happening in the functions.
    zen

  6. #36
    C > C++ duders ggs's Avatar
    Join Date
    Aug 2001
    Posts
    435
    I'm thinking more like in terms of specifying every action.. every allocation, every free. Sorta prefering to keep track of my own pointers rather than let the garbage collector do it, that's the sense I'm talking about.
    .sect signature

  7. #37
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    You do specify every action, but within a class (if you want to use classes). C++ doesn't have an in-built garbage collector.
    zen

  8. #38
    junior member mix0matt's Avatar
    Join Date
    Aug 2001
    Posts
    144
    ggs,

    check out the following link on the encapsulation of fork and dup2:

    http://www.csse.monash.edu.au/~damia...html/text.html
    THIS IS NOT JUST A CHRONICLING OF THINGS WE HAVE DONE IN THE PAST BUT OUR RISE TO POWER.

  9. #39
    Registered User Aran's Avatar
    Join Date
    Aug 2001
    Posts
    1,301
    you know what? i think in OO terms, so C++ is a better choice for me... it better suits my lines of logic and i work better with it. I'm not saying that you should all of a sudden denounce your previouse relations with C, all i'm saying is that it's better for me, and i prefer it and benefit from it. Just be smart.

  10. #40
    Registered User
    Join Date
    Oct 2001
    Posts
    95
    Hmm...In my opinion, they're almost alike, except C++ has classes...No offense to C users...But I like C++ better.
    Think out of the box! Open Source rules!

    -Breach23

  11. #41
    Registered User Aran's Avatar
    Join Date
    Aug 2001
    Posts
    1,301
    join the club, brother

  12. #42
    Registered User Aran's Avatar
    Join Date
    Aug 2001
    Posts
    1,301
    de-ja-vous... i remember seeing that exact same post before in this thread... i'm allitle too lazy to look back and post a big "a-hah, i havst found thee!" thing...

    i guess that's just too bad for you.

  13. #43
    junior member mix0matt's Avatar
    Join Date
    Aug 2001
    Posts
    144
    <I knew about pointers to functions, I think it is slopy, to point to your function.>

    i agree, it's much nicer to let the technology (compiler) do the nasty work for you. I was simply saying that functions can be "grouped" within structures using C, and there's more to C++ than member functions...
    THIS IS NOT JUST A CHRONICLING OF THINGS WE HAVE DONE IN THE PAST BUT OUR RISE TO POWER.

  14. #44
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    Whatever you do, do not ever choose assembly!

  15. #45
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    Actually I voted for both, not one or the other. Also I've had enough with the nonesence attacks on me. My points still stand. All major operating systems in the world were written in C except for a few high level components. The system API is written in C (Win32). These are the facts of life.

    As far as C++ goes, no it is not a managed language. This means that the programmer has the freedom and vulnerability of managing his own code. There is nothing built in to fix your mistakes. Also, I know OOP. I have used encapsulation, inheritance, and polymorphism. I am currently reading 'Effective C++ second edition'. I would rather work with objects than having to document the flow of data and processes through the whole program. It's easier to work with objects. The code is also less redundant. I intent to write high level applications. C++ or even perhaps a managed language like C# would be my choice, but I would hate to go without C because it is necessary to know your operating system and the sytem API.

    Just like I voted for both, I intend to use both! Never have I stated anything different.

Popular pages Recent additions subscribe to a feed