Thread: Is C out of date?

  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    33

    Is C out of date?

    Hi, just wanted to get everyone's thoughts on this. What I mean by my title is, I'm going to University to do a degree and hopefully if I get it, it will be four years down the road and I'll be looking for a job. My question is will C still be a popular language then? It seems to me that languages like C++, C# and Java are sort of muscling their way in and throwing out Big Daddy C. Is that the correct impression on what is going on?

    I feel that since C++ is such a huge language, lots of people are turning away from C and using it instead ( after all, C++ has a C subset so why would they use C when they could get C and then some using C++? ). Sorry if you get asked this kind of question all the time, I'm just wondering if C will still be popular when I'm finished University and if you think there will be jobs programming in C?

  2. #2
    Registered User
    Join Date
    Jun 2010
    Posts
    182
    Quote Originally Posted by CSaw View Post
    Hi, just wanted to get everyone's thoughts on this. What I mean by my title is, I'm going to University to do a degree and hopefully if I get it, it will be four years down the road and I'll be looking for a job. My question is will C still be a popular language then? It seems to me that languages like C++, C# and Java are sort of muscling their way in and throwing out Big Daddy C. Is that the correct impression on what is going on?

    I feel that since C++ is such a huge language, lots of people are turning away from C and using it instead ( after all, C++ has a C subset so why would they use C when they could get C and then some using C++? ). Sorry if you get asked this kind of question all the time, I'm just wondering if C will still be popular when I'm finished University and if you think there will be jobs programming in C?
    C language will still be there when you finish the university. C++ / C# / Java will be upgraded as well.
    Do you know there are still people programming in Assembly for producing drivers and high performance software? Not to speak about the part of operating systems that cannot be written
    in C or any othe language. C is sure will be useful for the next 10 years at least.

  3. #3
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    Conventional wisdom is, university programming will only teach you how to program. The real world is different from the academic world: the business world will always be using some other technology than the universities. Likely even in your lifetime, you will have to deal with learning something new. C is a nice way to meet credits, even if you never use it again. If you do use it again, so much the better, right?

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by frktons View Post
    C language will still be there when you finish the university. C++ / C# / Java will be upgraded as well.
    Do you know there are still people programming in Assembly for producing drivers and high performance software? Not to speak about the part of operating systems that cannot be written
    in C or any othe language. C is sure will be useful for the next 10 years at least.
    This is different. Take into account that C++ supports the entire C language as well as additional features. Looking at it from this perspective, C++ is a better C and it's a newer language incorporating features that make large programs feasible.
    Neither C nor C++ supports assembly as a part of the language, so assembly is a language in its own right, and is required to be so. But C also exists as a part of C++, so the same cannot be said for C.
    So why learn C? That, I believe, is CSaw's original concern.

    Unfortunately, the reality is cruel. Many embedded systems only support C because they're too cheap to create a C++ compiler. Many companies still has legacy C code lying around. And a lot of people still use C for desktop applications even though it's insane.
    So does C still have a meaning? Yes, unfortunately. Are you going to bump into C? That depends on what you're doing. Embedded programming? Highly likely. Desktop applications? Perhaps. Web programming? Probably not.
    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.

  5. #5
    Registered User
    Join Date
    Jun 2009
    Posts
    486
    Most programming languages are very similar except for the syntax. Learning C is a good one to learn, though, because you need to "roll your own" for just about everything, rather than just using some prebuilt functionality. This ability will serve you well in any language that you may use in the future.

  6. #6
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    This is a silly argument. You can "roll your own" in pretty much any language you want. This isn't limited to C.
    I might just as well argue that you should roll your own in C++ because it supports so many more features that can help you design more flexible generic code.
    Don't choose a specific language just because it lacks a lot of stuff so you can roll your own. Rolling your own stuff can be done in any language and is equally useful.
    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
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    It is better to characterize C and C++'s relationship as parasite and host. Which as which is left to the individual. But they are two languages on separate roadmaps. Where C and C++'s subset of C things are different are a frequent pest (and often FAQs) here at the forums.

  8. #8
    Registered User
    Join Date
    May 2010
    Location
    Naypyidaw
    Posts
    1,314
    Long Live C!!!

  9. #9
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by whiteflags View Post
    But they are two languages on separate roadmaps.
    Honestly, I don't think so. The C++ standards committee is very interested in making C++ better for embedded systems, much the same as C is. Plus everytime a new C standard comes around, it gets integrated into the next C++ standard after it.
    For example, C99 will be integrated into C++0x.

    Where C and C++'s subset of C things are different are a frequent pest (and often FAQs) here at the forums.
    Indeed. Usually, I think, it is because there is almost always a "better way" to do things. In am embedded environment, the "C way" is often the only way. But we don't see much of that here, though, I believe.
    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. #10
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    Quote Originally Posted by Elysia View Post
    Honestly, I don't think so. The C++ standards committee is very interested in making C++ better for embedded systems, much the same as C is. Plus everytime a new C standard comes around, it gets integrated into the next C++ standard after it.
    For example, C99 will be integrated into C++0x.
    Well maybe roadmap is a bad way to put it. They aren't, nor should they expect to be, developed in lockstep, and that matters. In fact this is more evidence to my parasite-host assessment of their real relationship. They're just evolving.

    Quote Originally Posted by Elysia View Post
    Indeed. Usually, I think, it is because there is almost always a "better way" to do things. In am embedded environment, the "C way" is often the only way. But we don't see much of that here, though, I believe.
    You know people compile C as C++, and that is literally the whole problem? I've been here a long time and a question about microcontrollers or whatever is not only rare, but the compiling confusion is nonexistent in those folks.

  11. #11
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by whiteflags View Post
    Well maybe roadmap is a bad way to put it. They aren't, nor should they expect to be, developed in lockstep, and that matters. In fact this is more evidence to my parasite-host assessment of their real relationship. They're just evolving.
    What exactly do you mean by lockstep? I know it is true that these standards take into account each other when being designed, though. C++ to be compatible with C and C not to overly break C++ or something.
    If that's what you mean, then yes, I agree. It is indeed a parasite-host relationship.

    You know people compile C as C++, and that is literally the whole problem? I've been here a long time and a question about microcontrollers or whatever is not only rare, but the compiling confusion is nonexistent in those folks.
    No idea what you're getting at here
    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.

  12. #12
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Quote Originally Posted by Elysia View Post
    What exactly do you mean by lockstep? I know it is true that these standards take into account each other when being designed, though. C++ to be compatible with C and C not to overly break C++ or something.
    I wouldn't say C and C++ are in lockstep at all.

    It is true that the first C++ standard was required to both minimise incompatibilities with C and to document the incompatibilities.

    The evolution of C after the 1989 standard, however, had no constraint for compatibility with C++ imposed. And the 1999 C standard introduced features that were incompatible with C++, despite being named similarly. C99 also introduced some features that originated during the C++ standardisation process.

    I don't know offhand if subsequent proposed updates of the C++ standard have specifically sought to maintain compatibility with C99. In practice, it is likely compatibility with the 1989 C standard is mostly maintained, but there would be a divergence from C99. The extent of (or minimisation of) such divergence is going to be a decision for the standardisation folks.

    A parasite-host description may once have been appropriate, but no longer, IMHO. It is now better characterised as a symbiotic relationship: both languages include features that, historically, had their genesis in the other. Both languages are now evolving separately, albeit that each is free to adopt features from the other.

    It is also untrue - despite often stated - that C is a small language and C++ is a large one. They are now both large languages, although C++ is the larger of the two and implementation of a C++ compiler is often considered more technically challenging than implementation of a C compiler. That might explain why some systems only have a supported C compiler but there are few target systems that with a supported C++ compiler with no C compiler.

    There have been some, in both C and C++ communities, who have suggested there needs to be some rationalisation of C and C++ into a single language that makes some feature trade-offs (i.e. pick the best of one or the other when there are mutual incompatibilities) in order to get a single language. However, there is also resistance in both camps, for both good reasons (eg some valuable features of one language or the other would be lost because of the necessary technical and non-technical trade-offs) and bad reasons (eg political and religious advocacy for particular features that would probably be better lost or modified in such a process).

    Such is the way with evolution of real-world languages - which is what C and C++ both are, and will remain. It is very easy to implement a language if there is no past legacy (existing code, tools, programmers, etc). When there is a significant legacy and investment (eg large code bases that would require hundreds of man-years of reverification effort) it is not so easy to introduce substantial change.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  13. #13
    Registered User
    Join Date
    Jun 2009
    Posts
    486
    Quote Originally Posted by Elysia View Post
    This is a silly argument. You can "roll your own" in pretty much any language you want. This isn't limited to C.
    I might just as well argue that you should roll your own in C++ because it supports so many more features that can help you design more flexible generic code.
    Don't choose a specific language just because it lacks a lot of stuff so you can roll your own. Rolling your own stuff can be done in any language and is equally useful.
    What I meant was that in C you don't have the option of the easy way out, whereas with many other languages the option is there and often tempting. So you learn more because you have to.

  14. #14
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I still find that silly. You miss out a lot of good language features by limiting yourself to C. Plus you're basically limiting yourself to the tools available in C and not in other languages.
    Say you need to roll something on your own in C++. Are you going to global functions with void* pointers? That would be silly.
    Plus you couldn't even do that in Java and C# and other languages.
    You need to learn that when you roll your own stuff, you should also what is already available. A course in writing algorithms can be handy stuff. More so that limiting yourself to C, I'd say.
    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. #15
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    From the trenches, I can say that C isn't going away, but it's definitely not the language de jour any more. You'll find C in zillions of places, but out of sight. On your home wireless router, inside your printer, running the guts of your mobile phone... The Linux kernel is a strictly C-only beast, and you'd be laughed out of town trying to submit a device driver written in anything else.

    Systems and embedded programming don't get a lot of exposure, and they aren't the "cool" thing to be doing, but they are still very much critical parts of the computing universe. Other languages are making headway, but it's like chipping pieces off one of the Great Pyramids. It's going to take a while. And certainly not until there's something better suited to the problem domains.

    I'm enthusiastic that C++ can push its way into the low level arena, but I'm one of the few. I think it will only happen over time by actual demonstration -- i.e., people getting embedded C++ out there and working, convincing the rest of the community, on an empirical level, that it's actually possible.

    If you're really serious about C, there will be good opportunities for the future.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. libcurl experience and question
    By Dino in forum C Programming
    Replies: 6
    Last Post: 10-26-2009, 02:07 PM
  2. Advancing day by day until it matches a second date
    By nhubred in forum C++ Programming
    Replies: 1
    Last Post: 05-30-2009, 08:55 AM
  3. Checking array for string
    By Ayreon in forum C Programming
    Replies: 87
    Last Post: 03-09-2009, 03:25 PM
  4. CDate Class - handle date manipulation simply
    By LuckY in forum C++ Programming
    Replies: 5
    Last Post: 07-16-2003, 08:35 AM