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; >Then maybe we should start using languages that have no type-safety whatsoever, perhaps? Only if we kill all of the ...

  1. #76
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >Then maybe we should start using languages that have no type-safety whatsoever, perhaps?
    Only if we kill all of the stupid people.

    >We have to sacrifice something for a better goal.
    So we'd be sacrificing C++ code quality for decreased C code quality? Normally a sacrifice results in improvement elsewhere, not deterioration. This sounds like a lose-lose scenario to me.

    >A lot of C code can be converted into C++ code with little effort.
    Idealistic ignorance is unbecoming. There likely isn't a C code base in existence[1] that can be converted to C++ without a lot of effort and resources.

    [1] That wasn't specifically written with C++ compatibility in mind.
    My best code is written with the delete key.

  2. #77
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,604
    Quote Originally Posted by Prelude View Post
    >We have to sacrifice something for a better goal.
    So we'd be sacrificing C++ code quality for decreased C code quality? Normally a sacrifice results in improvement elsewhere, not deterioration. This sounds like a lose-lose scenario to me.
    That's not how it's supposed to turn out -_-

    >A lot of C code can be converted into C++ code with little effort.
    Idealistic ignorance is unbecoming. There likely isn't a C code base in existence[1] that can be converted to C++ without a lot of effort and resources.

    [1] That wasn't specifically written with C++ compatibility in mind.
    That seems far-fetched to me. How about an example of what cannot be converted into C++ with little effort, so I can become less "ignorant"?
    And btw, it's also understandable that they would convert it into "C+" - just converting the code so it compiles with C++ compilers, not rewriting the entire structure to fit the C++ programming mindset.
    Last edited by Elysia; 01-11-2008 at 11:20 AM.
    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. #78
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >That's not how it's supposed to turn out -_-
    Surprise!

    >How about an example of what cannot be converted into
    >C++ with little effort, so I can become less "ignorant"?
    Code:
    int x;
    int x;
    int x;
    int x;
    int x;
    
    int main ( void )
    {
      x = 10;
      return 0;
    }
    Imagine multiple files and a lot of reuse of the identifier x in various scopes. There's more to the conversion than just making code compile. You also have to make sure that none of your changes broke the behavior of the code.

    >rewriting the entire structure to fit the C++ programming mindset.
    That thought never crossed my mind. I'm referring simply to making the existing C code compile and run properly as C++.
    My best code is written with the delete key.

  4. #79
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    There's also simply the fact that some people don't like C++. Linus Torvalds, for example.
    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. #80
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,604
    That's irrelevant. Simply because you don't like a language doesn't mean it shouldn't exist (to clarify: I think C should go away because C++ does everything it does and more and there are at least one reason I've stated that hamapers development of the standard due to the fact that TWO languages exist when there could exist only one!).
    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.

  6. #81
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,720
    Simply because you don't like a language doesn't mean it shouldn't exist
    That is a different issue though. The more practical implication of CornedBee's observation is: how do you get a C code base to move to C++ if the programming leads are not willing to make the change because they like the code to be written in C, without caring for C++ compatibility? So it is not so much that C++ should not exist, but that C should continue to exist as a separate programming language.
    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

  7. #82
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,604
    This calls for deprecation.
    Eventually everything will go away, so you should simply stop using at some point.
    The same could go for C. It will be deprecated; people start deploying new projects with it (though old projects will still use C and maintain it), but in the future, C will disappear. There will be such a time when no one teaches it anymore.
    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.

  8. #83
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >but in the future, C will disappear. There will be such a time when no one teaches it anymore.
    That's quite likely. But we're not there yet, so deprecating C (however you suggest we do that) will be accepted by the C community with a collective chuckle, and the edict will be promptly ignored.
    My best code is written with the delete key.

  9. #84
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,604
    I very much doubt we can do that now, since no one seems to want to use C++ to do everything C can. My opinion is just that C is longer necessary, but I can't do anything about it.
    Last edited by Elysia; 01-11-2008 at 02:02 PM.
    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. #85
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    The argument will finally be settled when the C programmers die of old age.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  11. #86
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,682
    We have already have so many post regarding this issue C or C++. I can also see that Prelude talking about C disappears. OH no, it shouldn't. It should be there forever. The whole computer evoluation had been evoled with C and C should continue for ever. Atleast I wish.

    ssharish

  12. #87
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >because no one seems to understand that C++ can do everything C can
    I guess we're done here then. Since you clearly don't respect the intelligence of your peers, there's no reason you should be offered that courtesy.
    My best code is written with the delete key.

  13. #88
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    Deprecation only has meaning within a standard. It only refers to later versions of a standard. To say the standard is deprecated would be meaningless, because there would always be a last version of the standard.

  14. #89
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,604
    Quote Originally Posted by Prelude View Post
    >because no one seems to understand that C++ can do everything C can
    I guess we're done here then. Since you clearly don't respect the intelligence of your peers, there's no reason you should be offered that courtesy.
    Did I miss something?
    Did someone mention something C can do that C++ cannot?
    All I think I've heard is that existing C code can't be converted to C++ easily and thus, since much is written in C without C++ compability in mind, C must stay. For a while, at least.
    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.

  15. #90
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    You missed that "no one seems to understand" is a rude thing to say.
    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

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