Thread: C Instead of C++

  1. #1
    People Love Me
    Join Date
    Jan 2003
    Posts
    412

    C Instead of C++

    I'm just a little curious as to why people stick to C when C++ is the superior language. This really isn't a question for help in either of the languages, so I suppose it belongs in GD. But anyhoo... I think my guesses would be...

    1.) People who learned C first didn't feel like learning the new features of C++.
    2.) Personal preference...?
    3.) C is a bit more difficult and people enjoy the slight challenge that is presented with not using C++....maybe it makes people feel more proud of their code?

    ...Am I close with any of these?

  2. #2
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    C++ is a more complex language than C.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  3. #3
    Registered User
    Join Date
    Aug 2002
    Location
    Hermosa Beach, CA
    Posts
    446
    Maybe because c++ wasn't available or stable on all necessary platforms when a given code-base was being developed (i.e. legacy code), and management has no interest in switching over now, because they feel it does not make sense business-wise.
    The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows.

  4. #4
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    Same reason I use Access at work instead of the bajillion other DBs out there. It's what management wants me to do.

  5. #5
    Registered User
    Join Date
    Mar 2004
    Posts
    494
    I have a question similiar to this topic. Im in the process of reading 2 beginners books, one C and one C++. On the C book i have about 6 lessons left, whereas on the C++ book i have 14 more lesson. So i was wondering, should i continue with a more advanced C book after i have finished the one reading now, or should i focus on finishing the C++ book and get an advanced C++ book and focus entirely on C++. I have kept reading the C book mainly because like Sang pointed out, i too find C easier than C++. But im not sure as to which language to focus more. What do you all think?
    When no one helps you out. Call google();

  6. #6
    verbose cat
    Join Date
    Jun 2003
    Posts
    209
    I don't really see many reasons to "start" with C since C++ is more or less a superset of C, so you can do just about everything with C++ that you could with C (including printf(), ugly casting, etc.).

    Just about the only reason I can see learning C specifically would be if you plan on getting a programming job where alot of C code is used/maintained (the C standard is evolving apart from the C++ standard and there are differences here and there that could trip up a "pure C++ programmer"). The more you know, the more marketable you are.

    If you are just a hobbyist programmer it's really a matter of taste. Then again, to be truly proficient with C++, you should know how to work with templates and container classes among other things that don't exist in C, so it will take you longer to learn C++ than to learn C.
    abachler: "A great programmer never stops optimizing a piece of code until it consists of nothing but preprocessor directives and comments "

  7. #7
    I like code Rouss's Avatar
    Join Date
    Apr 2004
    Posts
    131
    Quote Originally Posted by Krak
    C++ is the superior language.
    That's a matter of opinion.

  8. #8
    Registered User
    Join Date
    Mar 2003
    Posts
    580
    I personally find that everybody who uses a higher level language is, to be honest, completely inferior. Sure, anybody can write a program with a high level language such as C or C++. Heck, there are some pretty manly men (and women!) who can do some nasty assembly tricks. Me? I friggin solder circuit boards with the computer instructions I want to be executed. Man, it takes a lot of solder just to do a dotproduct! I started programming 18 years ago and I just finished my hello world! program.

    Okay now that I am done being a crap, I think few people realize these two points:

    - Not all of the features of C++ are useful
    - Yeah

    I rarely use templates or hardcore polymorphism in my C++ code. In fact, my C++ code just looks like retarded C (not to be confused with objective C), because it mostly IS C except in the unusual circumstance I do choose to use some of C++'s functionality. I think this holds true for a lot of amateur coders. And you really SHOULDN'T use C++ functionality just because it's there...the languages are like a toolset, and you need to pick the implement you are most comfortable with.
    Last edited by Darkness; 03-09-2005 at 06:36 PM.
    See you in 13

  9. #9
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,110
    All these threads about "C++ or C or Java or ...." ( you can fill in any programming language ) are imho ridiculous.

    I think it has been said more the a billion times that every goal you want to accomplish has several ways, but why go the hard way when someone already paved the road for you ?

    Right now I´m taking assembler ( 68K ) and Java classes, and when i have some free time i enjoy programming in C.

    1 year ago I only knew C and at that time I thought it was amazing, at this point I find the above 3 languages amazing.

    Anyway I just think this kind of threads have been here more then once and it always comes down to this imo: Program in whatever language you feel comfortable and suits with whatever you are trying to accomplish ( of course maybe you may feel much more comfortable with C++ or Java and then your boss or whoever comes along to tell you the project needs to be done in another language, well then just take it like that ).

    Just what I think about all these people asking " C++ or C or should i go with Java or Fortran or something else ? "

    Greets,

    Ganglylamb.

  10. #10
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    >>why people stick to C when C++ is the superior language.
    As has been mentioned, no stable C++ implementation may be available on the platform you're working with; I imagine it would be more difficult to write a C++ compiler than a C one. Also, if performance really matters, I've heard that C can be more streamlined than C++ (either because of less bulk, or simply because it's easier to write a good optimizing C compiler than C++).
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  11. #11
    former member Brain Cell's Avatar
    Join Date
    Feb 2004
    Posts
    472
    Quote Originally Posted by Krak
    3.) C is a bit more difficult
    in my opinion , C is straight-forward and waaaay easier than C++. In fact , C++ would be real hard to me if i havn't learned C.
    My Tutorials :
    - Bad programming practices in : C
    - C\C++ Tips
    (constrcutive criticism is very welcome)


    - Brain Cell

  12. #12
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >why people stick to C when C++ is the superior language
    Why is C++ the superior language? Can you give any hard facts that aren't based on your own opinion?

    >Am I close with any of these?
    Maybe for arrogant hobbyists who aren't interested in personal growth. I would wager that you posed this question because you've only written programs for yourself on a PC. You haven't encountered a million lines of existing C code that needs to be maintained. You haven't written code for an embedded processor that doesn't have (and probably never will have) a C++ compiler. You've probably been brainwashed into thinking that OOP is the way to go and C++ is the language for OOP. You've probably fallen prey to the propaganda about C++ being a "better C".

    The reality is that C is smaller, simpler, and far more portable than C++. However, because C++ is feature rich, you can pick and choose features that will make life easier than with C.

    >- Not all of the features of C++ are useful
    For you. What about the rest of the world? I don't think most people realize that if a feature weren't useful to someone (and probably a lot of people at that), then it wouldn't be a part of the language.

    >I imagine it would be more difficult to write a C++ compiler than a C one.
    No, not really. A C++ compiler requires more work than a C compiler because C++ is a larger language, but the hard stuff is present in both.

    >I've heard that C can be more streamlined than C++
    Performance isn't an issue when comparing well written C and C++. The difference will be negligable unless you try to palm off (where only idiots would believe you) a full OO design in C++ with a procedural design in C.
    My best code is written with the delete key.

  13. #13
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    This is a silly argument!
    Besides, we all know COBOL is the superior language.



    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  14. #14
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,820
    I still say BASIC is the best.
    I don't know how many times I have to argue this point.
    BASIC has easy syntax, runs extremely fast , OOP, templates, garbage collection, easly create a GUI.
    Woop?

  15. #15
    Registered User
    Join Date
    Mar 2003
    Posts
    580
    Quote Originally Posted by Zach L.
    This is a silly argument!
    Besides, we all know COBOL is the superior language.




    I am going to make a superset of COBOL. I am going to call it COBOL + 1.
    See you in 13

Popular pages Recent additions subscribe to a feed