Why C Matters

This is a discussion on Why C Matters within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I just read an amazing article about why C and C++ matter in today's software development world. Here is the ...

  1. #1
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738

    Why C Matters

    I just read an amazing article about why C and C++ matter in today's software development world.

    Here is the link:

    http://www.stsc.hill.af.mil/CrossTal...Schonberg.html

    I found it on Slashdot. I encourage all the read it (and comment if you want).

    Go C/C++!
    My Website

    "Circular logic is good because it is."

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,588
    hmm... cannot seem to access the page. Perhaps it is being slashdotted.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,537
    It works for me.
    I still don't see how C actually matters since C++ can produce the exactly same code with better compilers.
    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.

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    It's good for teaching if you're not given the chance to avoid some work. In C, you have to deal with low-level string representation. Once you're at a level where you're able to learn this stuff, that's a good thing.

    My own university's software engineering bachelor requires at least basic knowledge of Java (introduction to programming, object-oriented programming, software engineering), C (system programming), Haskell (functional programming), Prolog (logic-oriented programming), Assembly (prerequisite for compiler writing) and some web development language (web engineering course, typically PHP), and offers additional courses that touch on PostScript, Forth (stack-based languages), C++, and more.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #5
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >I found it on Slashdot.
    So good things can be found on /.? That's more interesting than the article.

    >I still don't see how C actually matters since C++ can
    >produce the exactly same code with better compilers.
    C is kewler because. Anyone who's anyone knows why C matters. If you don't know why C matters, you're not a real programmer. <insert more fallacious logic for why C is better here>

    But seriously, C matters because it's a royal .......... to translate oodles of legacy C to C++, and only an idiot or a gullible newbie believes that C++ compilers can compile real world C without significant changes.
    My best code is written with the delete key.

  6. #6
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,537
    Quote Originally Posted by CornedBee View Post
    It's good for teaching if you're not given the chance to avoid some work. In C, you have to deal with low-level string representation. Once you're at a level where you're able to learn this stuff, that's a good thing.
    But the thing is, that it can be done in C++ too. There could be C++ (systems programming) instead of C, that teaches low-level, typical, "C" code in C++ instead of C.
    That is what I don't get.
    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.

  7. #7
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    What's the point? If you're writing C code, use C. What's the advantage of using C++ to write C code?
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  8. #8
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >What's the advantage of using C++ to write C code?
    Why go out of your way to write C when C++ is right there?
    My best code is written with the delete key.

  9. #9
    Registered User
    Join Date
    Jan 2005
    Posts
    7,317
    As someone who generally recommends higher-level languages be taught first, I don't disagree with the gist of the article. Teaching Java is fine, but you can't teach it solely, nor can you do it at the expense of eventually teaching all the lower-level skills.

  10. #10
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,537
    The obvious advantage is that C++ compilers are much more standard compliant and better at type safety too, and allows for additional things like constant numbers instead of defines.
    Obviously, C is very old and C++ can do all C can and more, and with the very same speed and efficiency.
    So I don't see why we use C to write C code and not try to use C++ to write it instead so we can get rid of C.

    This I what I don't get.
    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.

  11. #11
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Quote Originally Posted by Elysia View Post
    The obvious advantage is that C++ compilers are much more standard compliant
    Bzuh?
    First, unlike C++, C actually has compilers that are 100% conforming to the language standard.
    Second, C++ compiler are certainly not compliant with the C standard.

    and better at type safety too, and allows for additional things like constant numbers instead of defines.
    Minor issues.

    Obviously, C is very old
    Latest full C revision: 1999. Latest full C++ revision: 1998. So C is more current than C++

    and C++ can do all C can and more,
    But we don't want more.

    So I don't see why we use C to write C code and not try to use C++ to write it instead so we can get rid of C.
    Get rid of C? You want to get rid of C, then use C++ to program C code? Again: why not just use C?
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  12. #12
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >The obvious advantage is that C++ compilers are much more standard compliant
    I only know of one C++ compiler that supports standard C++ completely. On the other hand, most of the C compilers are C89 compliant. C99 is damn near worthless, so I wouldn't call lack of conformance to it a good argument against C.

    >and allows for additional things like constant numbers instead of defines.
    That's a personal preference, IMO.

    >So I don't see why we use C to write C code and not try
    >to use C++ to write it instead so we can get rid of C.
    Probably because too many people are aware that it's impossible to "get rid" of a language that was as popular as C.
    My best code is written with the delete key.

  13. #13
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,537
    Quote Originally Posted by CornedBee View Post
    Bzuh?
    First, unlike C++, C actually has compilers that are 100% conforming to the language standard.
    Second, C++ compiler are certainly not compliant with the C standard.
    No, I believe someone corrected me before. Many C compilers allow stupid things that aren't actually allowed by the C standard. You can just as well pass a double to a function that wants void*. How's that for type safety? So far as I know, this is not allowed by the standard, but the code compiles nevertheless, but in C++ it would never work.
    This is what I was referring to.

    Minor issues.
    True, true. But then again, it will keep newbies for making silly mistakes and ignoring warnings.

    Latest full C revision: 1999. Latest full C++ revision: 1998. So C is more current than C++
    C was invented before C++, though... I don't know if there's going to be anymore updates to C? Anyone know about that?

    But we don't want more.
    Get rid of C? You want to get rid of C, then use C++ to program C code? Again: why not just use C?
    One language Why have two that can do the same thing?
    And besides, what if you want to do C+? I think in some situation you can get away with it. It's better to do C+ instead of pure C what you can't do full C++.
    Anyway, that's just my opinion.

    Quote Originally Posted by Prelude View Post
    >The obvious advantage is that C++ compilers are much more standard compliant
    I only know of one C++ compiler that supports standard C++ completely. On the other hand, most of the C compilers are C89 compliant. C99 is damn near worthless, so I wouldn't call lack of conformance to it a good argument against C.
    Sure, but as I mentioned to CornedBee, at least it seems to follow the standard better on things such as type safety.

    >and allows for additional things like constant numbers instead of defines.
    That's a personal preference, IMO.
    It is, it is. But then again, why use an old tool when you got a better, newer, shinier one? Shrug.

    >So I don't see why we use C to write C code and not try
    >to use C++ to write it instead so we can get rid of C.
    Probably because too many people are aware that it's impossible to "get rid" of a language that was as popular as C.
    I know... but if we keep teaching C, it will never go away. Best to start somewhere, isn't it?
    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. #14
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    C1x is in the planning. The C and C++ working groups are always collaborating. When C++ gets multi-threading support, C will follow soon after. (Indeed, C interoperability concerns were the main reason thread cancellation in C++ got axed.)
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  15. #15
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,656
    >I know... but if we keep teaching C, it will never go away. Best to start somewhere, isn't it?
    I was looking over my college's IT program (again). You'll be happy to know there is no C course.

    >It is, it is. But then again, why use an old tool when you got a better, newer, shinier one?
    You are permitted constant numbers in C. That's nothing C++ did new.

    >One language Why have two that can do the same thing?
    C++ compiles C. Read what Bjarne said about developing his language to be sure, but I'm sure that this is just a happy coincidence of all the C stuff you might want to use in C++, like pointers, constants, structs or streams. But they do not do the same thing. If C is the foundation for a newer language, then C++ isn't just carrying C around for no reason.

Page 1 of 10 12345678910 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Speed of C++
    By bobthebullet990 in forum A Brief History of Cprogramming.com
    Replies: 64
    Last Post: 01-12-2007, 01:39 AM
  2. Replies: 2
    Last Post: 09-28-2006, 01:06 PM
  3. C++ tests.
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 38
    Last Post: 06-30-2006, 06:51 AM
  4. Confuted/Blackrat: quaternion question
    By Silvercord in forum Game Programming
    Replies: 12
    Last Post: 08-18-2003, 06:02 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21