Slashdot Mirror


Is The C Programming Language Declining In Popularity? (dice.com)

An anonymous reader writes: Java overtook C as the most popular language in mid-2015 on the TIOBE Programming Community index. But now over the last 13 months, they show C's popularity consistently dropping more and more. C's score had hovered between 15% and 20% for over 15 years but as 2016 ended, the language's popularity is now down to 8.7%. "There is no clear way back to the top," reports the site, asking what happened to C? "It is not a language that you think of while writing programs for popular fields such as mobile apps or websites, it is not evolving that much and there is no big company promoting the language."

But the Insights blog at Dice.com counters that TIOBE "has hammered on C for quite some time. Earlier this year, it again emphasized how C is 'hardly suitable for the booming fields of web and mobile app development.' That being said, job postings on Dice (as well as rankings compiled by other organizations) suggest there's still widespread demand for C, which can be used in everything from operating systems to data-intensive applications, and serves many programmers well as an intermediate language."

i-programmer suggests this could just be an artifact of the way TIOBE calculates language popularity (by totaling search engine queries). Noting that Assembly language rose into TIOBE's top 10 this year, their editor wrote, "Perhaps it is something to do with the poor state of assembly language documentation that spurs on increasingly desperate searches for more information." Maybe C programmers are just referring to their K&R book instead of searching for solutions online?

286 comments

  1. In Korea ... by Anonymous Coward · · Score: 2, Funny

    ... C is only for old people!

    1. Re: In Korea ... by Anonymous Coward · · Score: 0

      A round donut also looks like a C, but it's not as good as cookie, and the moon sometimes looks like a C, but you can eat that! Cookie cookie cookie starts with C!

    2. Re: In Korea ... by Anonymous Coward · · Score: 0

      A round donut, *with 1 bite out of it*, looks like a C.

    3. Re:In Korea ... by phrostie · · Score: 1

      Maybe, I remember thinking the same thing about Assembly and Machine code, but my dad made a living at it for decades.
      In university(in the 1980's) one of my advisors told me not to take C.
      He said it was a fad and would never catch on.

    4. Re: In Korea ... by Anonymous Coward · · Score: 0

      My university professors said not to use STL as it had bugs in it. For any job in the South of England, it was a must have skill.

      Now the demand is in bundles of skills like (C++, STL, Boost) or (Javascript/HTML5/PHP) or C/ARM/microcontrollers. There isn't any point in just learning C unless you learn the CPU's and application development tools as well.

    5. Re: In Korea ... by Anonymous Coward · · Score: 0

      In their path to being old, they have gained wisdom and understanding that is absent in the naivety of youth.

    6. Re:In Korea ... by Anonymous Coward · · Score: 0

      What does that to do with Korea? Lame racist joke?

    7. Re:In Korea ... by Aighearach · · Score: 1

      Oh good, that means the pay for old programmers will go up again, like it was when the old people were doing the COBOL for the banks and the kids were using C.

      The last website I made, it was in C. Welcome to the IoT. Java is too fat to fit on a microcontroller, after all.

      I'm using C more and more all the time. I guess I'm getting old.

      Actually, when I search for stuff about C, I have to use other search terms, like the library I'm using, because "C" isn't a very unique substring. ;) Sometimes I even have to throw in a library I'm not even using, just to narrow the search terms to C. And for microcontroller stuff, C is actually spelled "avr-gcc" or "ESP8266 sdk".

    8. Re:In Korea ... by Dahamma · · Score: 1

      You don't need to use C for IoT. Probably the most interesting IoT SoC vendor around right now (Electric Imp) is using an interpreted language (Squirrel) to enable some pretty low level programming, and make it trivial to develop IoT apps.

    9. Re: In Korea ... by Anonymous Coward · · Score: 0

      Perhaps that is why IoT devices offer spectacular security and privacy.

    10. Re:In Korea ... by Anonymous Coward · · Score: 0

      That language sounds about right for the ADHD-kid millennial crowd.

      Q: How many millennials does it take to program a microcontroller?
      A: SQUIRREL! :points to the left:

      (FWIW, I graduated in 1998 and by some reckonings, I am a mllennial. Ugh, I hate myself.)

    11. Re:In Korea ... by Aighearach · · Score: 1

      If you don't think in absolutes, then your comment has no value. The existence or possibility of alternatives changes nothing that I said.

      You don't "need to use C for IoT," but you do need to use C for many specific microcontrollers that power IoT devices. Sure, you could just spend more money and get a device that can run more things. Sure, you can also use Lua on the ESPy. You don't get the same performance, though. How trivial it is to buy different hardware is irrelevant; smaller is cheaper, cheaper in this niche is going to mean that most of the tools are in C. The lack of supporting tools and libraries for your alternatives might cause them to even take longer to develop with!

      You might find the Brandybrand(TM) that you mentioned to be the most interesting, but I would counter that a ~$30 device that does less than a $6 ESPy is not really a great example of alternatives being viable. They certainly can and will exist, but at the hobbyist level. That thing is competing with the raspberry pi for the "I want to do it myself but I don't know how to do it" market. That is not the same thing as the IoT market.

    12. Re:In Korea ... by Dahamma · · Score: 1

      No, if you graduated in 1998 (assuming you mean college) you are not in ANY reckonings a millennial. You are literally borderline OLD PERSON!

      But beyond that, check out the language. It's basically Lua but really good.

    13. Re:In Korea ... by Dahamma · · Score: 1

      The last website I made, it was in C. Welcome to the IoT

      This comment is ignorant.

      If you don't think in absolutes, then your comment has no value.

      This comment means you didn't understand mine.

      Yes, obviously, a decreasing but still important share of the market is using C (THAT'S THE POINT OF THE ARTICLE!) My point was IoT will NOT be a resurgence of C, it will be a small amount of core OS/middleware programming in C (which is what it was meant for) and a ton of programming in an efficient higher level language.

    14. Re:In Korea ... by Aighearach · · Score: 1

      The last website I made, it was in C. Welcome to the IoT

      This comment is ignorant.

      That's one of the most ridiculous things you could say. How could I possibly be ignorant of the details of my work, and why would you know better what I did?

      Yes, obviously, a decreasing but still important share of the market is using C (THAT'S THE POINT OF THE ARTICLE!)

      No. That is not the point of the article at all. The point of the article is that searches for help on C that list themselves as being for the C language have decreased. Trust me, C programming requires much more careful understanding of details than you're showing. Are you sure you have enough knowledge to be talking about this one?

    15. Re:In Korea ... by Dahamma · · Score: 1

      That's one of the most ridiculous things you could say. How could I possibly be ignorant of the details of my work, and why would you know better what I did?

      Not talking about your work, the "Welcome to the IoT" was what I felt was ignorant, of course. IoT is not about C these days (in terms of volume) if you are paying attention. It's about a tiny (C based, for an interpreter, etc, of course) kernel and tools and a HUGE higher level ecosystem.

      The point of the article is that searches for help on C that list themselves as being for the C language have decreased.

      No, that's the *methodology* of the article, but the *point* was that C is declining in overall popularity as a total percentage of programmers.

      I don't want to get into a pissing match on C/C++ programming, but I'm pretty sure I have plenty of knowledge on C/C++ in the embedded space. I'll just say any Smart TV, BD player, and most STBs that stream video in the past 6+ years (300M+? Maybe more?) have many lines of C/C++ code I wrote in them.

    16. Re:In Korea ... by Aighearach · · Score: 1

      "Welcome to the _____" means that the thing is part of the experience there. There is nothing exclusive; if it meant that was the only thing there, it would require more words. Words that I didn't include.

      If you think that C code on IoT devices is just for running an interpreter then my advice is to look past the ESP8266 because as awesome as it is, and as cool as Lua is, most products using the ESP are using C, and there is a very popular C webserver for it you implement the dynamic elements as C callbacks. That is the sort of thing that is driving IoT, and most of the IoT chips don't even have popular interpreters ported to them! You say you've got video code on embedded devices, that's nice but those are high powered systems compared to the cheap ICs necessary for IoT. If you're doing video, you need resources, and you can use a lot more normal types of coding techniques and preferred tools to get the job done because they use less than video. IoT is about having a very small amount of resources.

      And no, you can't separate the methodology of their test from the implications. That is true of any sort of test or study; the details of what was studied sets the stage for what you can claim that it shows. A methodology based on web searches can't actually tell you about popularity unless you have really extensive data on confounding variables, and nobody has that here. So you can't improve the data quality enough to make that sort of claim. You can't even make that claim! It isn't available. All we know is that searches changed. It could be as simple as, some percent of searches for C used the word "Arduino" instead of "C" and there wasn't even a change in actual searches. That's how broad and unresolved the confounders are. The idea that it might be less popular isn't even a hypothesis, it is just an idea thrown at the wall that might explain it. Or might not.

  2. We're all programming in Machine Code by Big+Hairy+Ian · · Score: 4, Insightful

    Bear in mind almost all of the rival languages were written in C themselves and C is written in machine code most of us are programming in C and Machine Code anyway. In the end we're all writing Machine Code we've just wrapped it up in a nicer package is all

    --

    Build a Man a Fire, and He'll Be Warm for a Day. Set a Man on Fire, and He'll Be Warm for the Rest of His Life.

  3. Oh gosh by Anonymous Coward · · Score: 2, Insightful

    Not again.

  4. Re:We're all programming in Machine Code by Anonymous Coward · · Score: 2, Interesting

    Your compiler is programming in machine code. You just feed it hints.

    Feed your compiler some good hints and it might even write code to use the full width of those vector registers your processor has but you were ignoring.

  5. Search engine? by denisbergeron · · Score: 4, Insightful

    Everybody that work recently with C IDE knows that you don't need search the web to find information !

    --
    Ceci n'est pas une Signature !
    1. Re:Search engine? by Anonymous Coward · · Score: 3, Insightful

      Even without an IDE.

      C is simple enough not to need a lot of searching to find out how to do things - unlike nearly all the OO languages.

      Assembly got searched for more due to the shift from Intel to ARM. Also searches for Intel assembly grow due to all the crap intel has had to add to a poor instruction design to maintain "compatibility". If the RISC underpinnings of the X86 (both 32 and 64 bit lines) were accessible the speed would increase by 10-15%.

    2. Re:Search engine? by Anonymous Coward · · Score: 0

      More or less.

      But yes, web searches is a bad way to measure popularity.
      Bad syntax and crappy documentation inflates the values.

    3. Re:Search engine? by Anonymous Coward · · Score: 1

      On Linux:
      C -> man pages
      C++ -> web search
      Python -> web search

    4. Re:Search engine? by Waffle+Iron · · Score: 2

      If C developers aren't searching for C info, they ought to be. People may think that C is simple, but it's full of hidden gotchas.

      For example, strncpy() doesn't actually do what any reasonable person would assume it does. Using it in the wrong "obvious" way can result in bugs that won't easily be found during testing. There are hundreds more land mines like that sprinkled throughout the C ecosystem, and they all need to be reviewed repeatedly before one can be considered an experienced developer.

    5. Re:Search engine? by Anonymous Coward · · Score: 0

      Python -> use "?" in ipython. Python comes with batteries included :)

    6. Re:Search engine? by iggymanz · · Score: 1

      eh, strncpy() doesn't do what the strncpy(3) man page says it does?

      I usually don't need a search engine since I have man pages for common C functions

    7. Re:Search engine? by Waffle+Iron · · Score: 2

      That's nice that you have the optional local documentation installed for the C libraries, so you can find out that strncpy() doesn't do what any reasonable person would assume it does without searching the web. (Do you have the POSIX versions installed as well? Sometimes it conflicts with the Linux version, and both can be extremely vague. For those entries, you might have to start searching the web.)

      Not to mention that many if not most of the gotchas are in the core language, and man pages won't help you much there.

    8. Re:Search engine? by syzler · · Score: 1

      For example, strncpy() doesn't actually do what any reasonable person would assume it does. Using it in the wrong "obvious" way can result in bugs that won't easily be found during testing. There are hundreds more land mines like that sprinkled throughout the C ecosystem, and they all need to be reviewed repeatedly before one can be considered an experienced developer.

      Knowing the prototype of "char * strncpy(char * dst, const char * src, size_t len);", my assumption would be that strncpy() would copy up to 'len' bytes of data from the 'src' pointer to the 'dst' pointer which probably does not include a NULL terminator if the 'src' string is longer than 'len'. As such, as a programmer I should pass 'dst_len - 1' as 'len' so I can ensure the 'dst' string is NULL terminated by calling "dst[dst_len-1] = '\0';" immediately after calling strncpy().

      If this is an unreasonable assumption, what is a reasonable assumption?

    9. Re:Search engine? by syzler · · Score: 1

      What distribution has the libc libraries and headers available without the corresponding documentation?

    10. Re:Search engine? by gweihir · · Score: 1

      "IDE"? What is that? Is that like some poor-man's version of Emacs with man-pages integrated?

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    11. Re:Search engine? by gweihir · · Score: 1

      "man strncpy" explains the gotchas:

            " Warning: If there is no null byte among the first n bytes of src, the string placed in dest will not be null-terminated."

      If you think they are "hidden", then you seem to have some problem with reading comprehension. So really, to strncpy one byte longer and zero the last one. If that is beyond your skills, please stay away from C.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    12. Re:Search engine? by gweihir · · Score: 1

      For any competent coder that understands how the machine actually works, this is a very reasonable assumption. And, in addition, it is documented in the second sentence describing srtncpy in the man-page under Linux, for example. How this can be called "hidden" or even a "gotcha" is beyond me. Of course there is this one large class of incompetents where it is always somebody else's fault.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    13. Re:Search engine? by Aighearach · · Score: 1

      Oh, I do plenty of searching when using C, but I wouldn't be searching for "C" I'd be searching for strncpy examples directly, without talking about C, and most of the results I'd be looking at would be code repos not paste sites.

      Also, lot of C questions will actually be questions about make or autoconf.

    14. Re:Search engine? by Aighearach · · Score: 1

      Well, if you consider the man pages to be vague, maybe C just isn't for you? Maybe you should leave it to the old people, whose understand all that gobblygook.

      Also, if you're hitting C language gotchas, rather than library gotchas, you should probably just believe yourself to be less clever, and you'll stop doing it. Clever C code is also known as a bug. Let the compiler do the clever parts unless you're on a microcontroller and then you write the clever parts in ASM.

    15. Re:Search engine? by Waffle+Iron · · Score: 1

      Yes, you would naturally assume that best practice is to artificially adjust the buffer length, and to execute a separate statement to add a null char *every* time you call one particular library routine, especially if most every other library routine that starts with "str" does set the null terminator unconditionally and doesn't require you to fudge the buffer length.

      Or at least you might assume that if you were an imbecile.

    16. Re:Search engine? by Waffle+Iron · · Score: 1

      It the function were named "copyTeminatedStringTo_UNTERMINATED_memoryBuffer()", then you'd have a point.

      As it is, this non-string function is named just like all of the actual terminated string functions. So you can save your insults; *I* know about this C library fail (along with scores of other fails), but this problem usually crops up multiple times in any significant project with more than a couple of team members. So much so that it's best to prohibit the use of this function altogether in coding standards, and replace it with a home-grown function that does what people actually expect.

      Attempts to "fix" the problem by fudging the buffer and setting characters are just asking for fencepost errors. Not to mention the performance penalty for needlessly zeroing out any empty space after the string.

    17. Re:Search engine? by iggymanz · · Score: 1

      Nope, you're the one that isn't reasonable. The function does exactly what the doc says, and those of us who code in C have the correct docs for our libraries.

      gotchas in the compiler? Nah, they're well documented too. ANSI standards, compiler extensions....

    18. Re:Search engine? by gweihir · · Score: 1

      Attempts to "fix" the problem by fudging the buffer and setting characters are just asking for fencepost errors. Not to mention the performance penalty for needlessly zeroing out any empty space after the string.

      No, they are not. They are what you do if you are competent. There is no "fudging" here, just sound practices. This is however C not Java, so do not expect a nice verbose safety net. Your proposal of "copyTeminatedStringTo_UNTERMINATED_memoryBuffer()" already shows that you may know some C, but you do not get it at all. For starters, the first part of the name is wrong as strncpy can and will be used to copy non-terminated strings. Also, the termination is never the task of a buffer, so the second part of the name is just as wrong. Please leave and go to your walled garden where everything is safe an nice (and a slow memory-hog), we real coders have work to do.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    19. Re:Search engine? by Waffle+Iron · · Score: 1

      As I said, "sound practice" involves not using that damned function at all. Why do you defend the design of an API that requires you to add an extra line of mitigation code every time you use it?. And why would you accept the performance hit of the extraneous zero padding? It's most likely worse than any of the bounds checking you're so worried about. But an actual "real programmer" would know that.

    20. Re:Search engine? by Anonymous Coward · · Score: 0

      Don't do a web search.
      Check iso-iec-9899-1999.pdf instead.
      The information you find on the web is often incomplete or limited to a specific library implementation.

      I just re-read what the standard said about strncpy() and I can't find anything about it that appears to be odd.
      Can you clarify what you think is unreasonable with how it works?

    21. Re:Search engine? by syzler · · Score: 1

      If a C string array needs to be NULL terminated, then a 16 byte array only has 15 bytes of usable string storage. How am I artificially adjusting the buffer length by telling strncpy() to copy at most 15 bytes of data?

      Let's take another approach. Let's assume I need to copy of C string into a fixed length array as might happen with a binary protocol. If strncpy() automatically NULL terminated the string, then I would be unable to use every byte of the fixed width field as one byte would always be consumed by the superfluous NULL terminating character (unless, of course, I write my own function).

      In its current form, strncpy() can be used for copying strings into fix length fields or into another string array without the need of two functions.

    22. Re:Search engine? by gweihir · · Score: 1

      The design of strncpy is not bad, it is specialized. This is not a function to be used for every case of a string copy. Now, the only thing you could accuse strncpy realistically of is bloating the API. But the C string API is small enough for that to not really matter.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    23. Re:Search engine? by Waffle+Iron · · Score: 1

      So you've avoided the need for another function by requiring the user to add *two* separate manual fixups to each call of the most common use case. Do you realize how stupid that is?

      Of course, the best practice is to forbid the use of strncpy at all in coding standards, which then involves what you said you wanted to avoid: writing your own function.

      I'm not the only one to point this out. Here's the discussion of strncpy from Wikipedia:

      Despite the well-established need to replace strcat[10] and strcpy[6] with functions that do not allow buffer overflows, no accepted standard has arisen. This is partly due to the mistaken belief by many C programmers that strncat and strncpy have the desired behavior; however, neither function was designed for this (they were intended to manipulate null-padded fixed-size string buffers, a data format less commonly used in modern software), and the behavior and arguments are non-intuitive and often written incorrectly even by expert programmers.

    24. Re:Search engine? by HeckRuler · · Score: 1

      People may think that C is simple, but it's full of hidden gotchas.

      Compared to what?

      EVERY language is full of hidden gotchas. Doing shit behind your back under the hood which works 90% of the time but the remaining 10% will eat 99% of your time. Dynamic typing which lets you work REAL fast without having to worry about types, until you do, at which point you have to consult a mystic to determine just what the fuck is going on.

      If you want to start talking about what "reasonable people would assume", you've got a shmorgas board of variation in the human condition that keeps any group of 5 or more from agreeing about how things ought to be. strncpy copies a string for 'n' characters. If you don't understand null characters, C and strings might not be for you. And yeah, that is something that the language could handle for you if it assumed a certain desired behavior. And that'd work 90% of the time.

      But name me a language which doesn't have hidden gotchas.

    25. Re:Search engine? by Anonymous Coward · · Score: 0

      'strncpy' is meant to solve one problem only: continuing to copy a string buffer until you hit a null causing overflow, and it solves it adequately by allowing you to copy no more chars than the buffer will hold.

      That said, it would have been a lot better if they had included string handling as part of the language, and not relegated it to library functions. There might be a slight overhead, but since strings are so commonly used, it's worth it to solve these problems in one fell swoop by including a string type.

    26. Re:Search engine? by david_thornley · · Score: 1

      I can also accuse strncpy() of polluting the namespace and taking up a name that would ideally be for a length-limited string copy As it is, it's a special case a programmer has to remember.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    27. Re:Search engine? by Anonymous Coward · · Score: 0

      What you call a "special case," I call "knowing WTF you're doing."

    28. Re:Search engine? by gweihir · · Score: 1

      If you expect a general string-copy function in a language like C that does not really have native strings, but just a convention in the native libraries, than the problem is in your side. Incidentally, if you expect a "strNcpy" to be general, then there is an even bigger problem on your side, as there is no way to generically shorten a string to a given length. There is always a range to chose from. What you probably want is strdup(), which indeed does copy any string, but it does not copy into a provided bufferer, which is the whole point of the str*cpy functions.

      Seriously, C is not a beginners language. Go play with Java or the like and stop complaining about things you do not understand.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  6. Re:Fuck You New Slashdot Owners, Fuck You by Anonymous Coward · · Score: 0

    Your fucking vitriol is refreshing to me, and I wish to subscribe to your motherfucking newsletter!

  7. Bullshit metrics by _merlin · · Score: 5, Insightful

    I don't use much straight C these days (mostly C++ with bits of Python, lua, PHP and other stuff for glue, and occasional C#), but the metric is bullshit. It's a measure of which languages are most suited to passing roadblocks using search queries including the language name. This tends to select for how much a language is used by inexperienced developers.

    I'm a pretty experienced C++ developer, so I'm unlikely to be putting C++ in search engine queries. I know the language and library pretty well. If I want to get reference for a particular standard library feature, I'll use a query like, "codecvt site:en.cppreference.com". If I want docs for a Linux feature (e.g. routing sockets or the capabilities API), I'll pull up a man page. If I want to know what some ioctl does and the docs are lacking, I'll look at the Linux kernel source. I'm not typing C++ into google when I'm doing my day job or open source work. Same applies for other programming languages I'm competent with. I do bits of assembly language, but I'm not typing that into Google. I have user mode architecture manuals for the processors I need to deal with, and ABI manuals for the operating systems.

    On the other hand, I'm far more likely to put the name of a language I'm less familiar with and only use occasionally into a search query when I'm trying to find the conventional way to do something. Something like "C# confirm close modified document window", "python open subprocess stderr", or "php openssl rsa". I'm a clueless goon when it comes to available libraries and best practices for these languages, so I boost their TIOBE rankings on the occasions when I have to use them, while my bread-and-butter C++, assembly language and C don't show up, despite working in C++ for the bulk of my programming time.

    1. Re:Bullshit metrics by Solandri · · Score: 4, Interesting

      I'll add that every C/C++ IDE I've used has really good built-in documentation and search features. I've rarely felt the need to google something when programming in C/C++.

      OTOH when I was writing stuff in Perl or PHP, I was googling stuff constantly because the documentation is online and the sites' search feature sucks.

    2. Re:Bullshit metrics by GrumpySteen · · Score: 4, Interesting

      Search engine metrics are also flawed in another way; the worst examples of things often generate a lot of searches, but that doesn't mean they're popular. This metric would tell us that the most popular financial company is Wells Fargo. They're at the top because of the news that they created millions of fraudulent accounts, however, and not because they're popular.

    3. Re:Bullshit metrics by Anonymous Coward · · Score: 1

      New languages also tend to have crappy unorganized documentation, which in turn creates more queries. This explains the sudden rise new languages sometimes experience in the index, which tends to stabilize to a slow decline later once someone cleans up and improves the docs.

    4. Re:Bullshit metrics by JoeMerchant · · Score: 1

      Straight language queries are rare for experienced developers - more telling would be queries for APIs. Even after 10 years using an API, I still google search for how some of the functions work, what's the order of the arguments, what are the available enum options. The API you query often gives away the language you are using.

    5. Re:Bullshit metrics by EmperorOfCanada · · Score: 1

      I pretty much put the same ratio of queries into google to the time I am using it. The question would be how well my queries can be connected to my language. If I am using Python for the first time in a while my query will be something like "Connect to mysql with Python" but with C++ it will typically be a copy and paste of some strange linking error. Can that copy and paste be connected to C++?

      If my later query isn't being connected to C++ then the typically more experienced programmers aren't being properly counted and they are the ones doing the "real" programming of things that make the world go around. I love parts of python, I love parts of PHP, I use them for some small things. But for my "real" work that if not done would have a measurable economic impact it is C++ all the way.

  8. C is dying... by Anonymous Coward · · Score: 4, Funny

    C is dying, Slashdot confirms it!

    1. Re:C is dying... by Blrfl · · Score: 0

      You forgot the important part:

      "Film at eleven!"

    2. Re:C is dying... by GrumpySteen · · Score: 1

      I'll wait for the microfiche at midnight.

    3. Re:C is dying... by Anonymous Coward · · Score: 0


      #include <stdio.h>
      int main()
      {
              printf( "goodbye, world.\n" );
              return 0;
      }

    4. Re: C is dying... by Anonymous Coward · · Score: 0

      #include
      int main () { exit (EXIT_SUCCESS); } /* in my opinion */

  9. Yup, the economy is good. by darthsilun · · Score: 1

    So developers get a chance to play with all the new shiny toys for a while.
    When the economy crashes again everyone will run back to the old tried and true, because they need to get work done.
    This is about the fourth or fifth time I've seen this happen during my career.
    Although IMO it would be nice to see something come along that could replace C for, e.g., kernels.

    1. Re: Yup, the economy is good. by Anonymous Coward · · Score: 0

      You want 2 things out of a kernel: stability and performance. Consequently, they should be written at the lowest readable levels. Assembly languages are a little too verbose for modern kernels, and OO languages have demonstrated a lack of predictability in execution which is unacceptable for kernels.

    2. Re: Yup, the economy is good. by darthsilun · · Score: 1

      Thank you Captain Obvious.

      You neglected to tell us that C is portable, and assembly is not. One of the big points of the Unix and Linux kernels is that there is very nearly no assembly.
      Also I don't really buy your statement that OO languages lack predictability in execution. While I would probably not suggest C++ for a kernel, my use of it – for storage software – did not not exhibit any unpredictability. To be sure, we used a very limited set of C++ features, and perhaps there are features we didn't use that might cause the unpredictability you're referring to – ymmv. I also have knowledge of another Open Source storage project written in C++ that uses every fricken last feature of C++ there is, and I have have heard a lot of things about it, but never that it had unpredictable execution. It's slow, but it's predictably slow.

      I couldn't tell you about Rust, Golang, or Swift, as I haven't used those very much. Java's object ref counting and garbage collection seem like they'd be a can of worms – even if you were using a native compiler like GNU gcj – maybe that's what you're referring to.

    3. Re: Yup, the economy is good. by Anonymous Coward · · Score: 0

      I write flight critical software; people gets real excited when it crashes. Granted, none of my software uses such weaknesses as dynamic memory allocation, but you really don't understand software engineering if you don't understand the inherent limitations in object oriented programming. Sure, verifiable software can be written in some OO languages, but you end up throwing away everyone which is object oriented and the reusability of code.

      Do you really know how long your code takes to execute and what will happen for each imaginable error condition? I do. Again, not important for web crap.

  10. I'm seeing a resurgence in C by dottrap · · Score: 5, Interesting

    I'm seeing a resurgence in C. It seems to be coming from several different directions.

    The first is from people like Mike Acton:
    CppCon 2014: Data Oriented Design
    https://www.youtube.com/watch?...

    The second is from all the new languages like Go, Rust, Swift. All these new languages need libraries so they all built in good C interoperability so they could be useful immediately without requiring ground up new implementations of everything. So I'm seeing more new pure C libraries being created now than I've seen in a very long time. Library developers know that their libraries will be usable from every language if they write it in pure C.

    The third is from IoT. Embedded developers never left C. Now with IoT growing, C lives on.

    In all of these cases, they might fly under TIOBE's radar. Most of these people probably don't need to search for C. They already know it and are too busy working on their projects.

    1. Re:I'm seeing a resurgence in C by DrXym · · Score: 1

      Library developers know that their libraries will be usable from every language if they write it in pure C.

      Library developers know that their libraries will be usable from every language if they write it in Rust too. With the added advantage that the code is liable to be far more stable and reliable.

    2. Re:I'm seeing a resurgence in C by EmeraldBot · · Score: 5, Informative

      "New languages"?

      Pssht! As if!

      Man, there's so many varieties of Object-Oriented C you could jizz your pants without even touching yourself.

      C is the Primal Language. Before C we have clicks and whistles.

      This isn't even a fucking conversation. I'm not hearing what anybody says except my own opinion, because I know my opinion is right, so this isn't a conversation.

      What did that dude say in "Fight Club"? "This. Conversation. Is. Over."? Right? Well man thissuh conuhversationuh isuh nottah happenun.

      This is some bullshit. Fuck, there are HLA interpreters that are more popular than JAVA -- WITH PEOPLE WHO KNOW HOW TO CODE.

      Man this is so much bullshit. I can't believe there's no viewpoint, no slant, no perspective, no synonym of whatsoever with this article.

      That's the new owners of Slashdot. This site is dead. If you can diss C because some homie of yours called you up and needed some help raising interest in some particular market, towards a hopeful stock point, maybe on some IPO to come, maybe on something pre-existing, then fuck it, it ain't news any more, man, and it ain't for anybody but the "business school" {nested: "nerds"}.

      When you say things like "This isn't even a fucking conversation. I'm not hearing what anybody says except my own opinion, because I know my opinion is right, so this isn't a conversation" and "What did that dude say in 'Fight Club'? 'This. Conversation. Is. Over.'? Right? Well man thissuh conuhversationuh isuh nottah happenun.", It becomes blindingly obvious you are either high on drugs, drunk with some shots I would pay to learn the composition of, or suffer an untreated case of a narcissistic personality disorder combined with the temperament of a three year old, because this is a public. forum, not your personal soapbox. You want to rant on about how unfair a major index has ranked a language you imply you know very little about, without any rational debate, feel free to take it to your Twitter page.

      Oh. And uh, while I personally believe it's unethical to provoke those who are (at least at present) mentally incapacitated, I thought I should show you a little what the previous owners of Slashdot, Dice, ran a few years ago. I can sense the sound of your head exploding, eh?

      --
      "Set a man a fire, he'll be warm for the rest of the night. Set a man afire, he'll be warm for the rest of his life."
    3. Re: I'm seeing a resurgence in C by Anonymous Coward · · Score: 0

      A major index. On the web. Of what web "programmers" use to do their programming.

      Okay, britey-green dude. Sure, whatever you say.

    4. Re:I'm seeing a resurgence in C by darthsilun · · Score: 5, Informative

      C is the Primal Language. Before C we have clicks and whistles.

      Before C we had B, and APL, PL/1, Cobol, and Fortran, just to name a few.
      Come up for air sometime, it really helps clear your head.

    5. Re:I'm seeing a resurgence in C by Half-pint+HAL · · Score: 1

      So I'm seeing more new pure C libraries being created now than I've seen in a very long time. Library developers know that their libraries will be usable from every language if they write it in pure C.

      But that still marks a shift away from C in "macro" development. C's a good choice for small, self-contained chunks of code that are likely to be reused frequently, but the bulk of dev work is specialised glue logic for a particular app -- probably a Temple Run clone. Nobody's going to write a Temple Run clone in C.

      --
      Got them moderator blues I blieve I walk out the do', With these mod-points I been gettin', I 'most never post no mo'
    6. Re:I'm seeing a resurgence in C by Anonymous Coward · · Score: 0

      Reliable and stable maybe, but also without proof of being backdoored: there is only a single self-hosting Rust compiler.

    7. Re:I'm seeing a resurgence in C by Anonymous Coward · · Score: 1

      Before C we had B

      Are you Brian Kernighan?

    8. Re: I'm seeing a resurgence in C by DrXym · · Score: 1

      Rust is open source, just like GCC, clang, llvm etc. Feel free to review it, or compile your own version if you're so paranoid.

    9. Re:I'm seeing a resurgence in C by lucasnate1 · · Score: 0

      In Haskell you can write functions that support C calling convention and can be called from anywhere, I am sure the same is true for other languages. Just because someone uses the C calling convention does not mean he is using C.

    10. Re: I'm seeing a resurgence in C by Trailer+Trash · · Score: 2

      And lisp, don't forget that.

    11. Re:I'm seeing a resurgence in C by Anonymous Coward · · Score: 0

      > Before C we had B,

      While B was a step towards C, I don't think that it was ever released outside of AT&T. B was derived from BCPL which was a real language. This was 'Basic CPL' where 'basic' referred to 'fundemental' and not to K&K's language. CPL was 'Combined Programming Language' which was never fully implemented and was to be a combination of features from several previous languages.

    12. Re:I'm seeing a resurgence in C by darthsilun · · Score: 1

      Before C we had B

      Are you Brian Kernighan?

      No

    13. Re:I'm seeing a resurgence in C by darthsilun · · Score: 2

      Before C we had B

      Are you Brian Kernighan?

      No

      Brian has a beard. I don't.

    14. Re: I'm seeing a resurgence in C by superdana · · Score: 1

      Ah, Lisp—the recumbent bicycle of programming languages.

    15. Re:I'm seeing a resurgence in C by Anonymous Coward · · Score: 0

      Forth, Lisp, BASIC, Logo, Algol

    16. Re:I'm seeing a resurgence in C by Anonymous Coward · · Score: 0

      C works everywhere; Rust doesn't. Moreover, competently written C code does not have to be any less stable or reliable than if the same code were written in Rust or any other nanny state language du jour, but it will almost certainly be faster and useful to more people and it will still work long after everyone has forgotten that Rust ever existed.

    17. Re: I'm seeing a resurgence in C by Anonymous Coward · · Score: 0

      Ok, "Thee ith the primal language. Before thee we have clickth and whithleth"

    18. Re:I'm seeing a resurgence in C by DrXym · · Score: 1

      That's the case for Rust. It has a foreign function interface that is basically just methods exported in a way that C expectant applications can link to. Providing the client has C headers corresponding to the .lib it is linking to it becomes completely ignorant of what the libs was written with - Rust, Haskell, anything.

    19. Re:I'm seeing a resurgence in C by DrXym · · Score: 1
      C works anywhere (* subject to a massive list of restrictions and caveats). And the keyword here is "competently written C code". Rust kicks your ass if you do stupid stuff well before the code gets in production. It's frustrating when you're learning the language but the result is code that simply doesn't fail in the ways that C or C++ does all too frequently - memory leaks, dangling pointers, data races etc.

      And perhaps people will stick with C longer that Rust. That doesn't make much of an argument for a library being written right now. Nobody would backport a Rust library to C. The rust compiler will exist as long as C does. There is no reason whatsoever to go with a retrograde language for what may or may not happen some unspecified time in the future. If that argument made any sense we'd be coding in BCPL, or assembly. You know, just to be safe.

    20. Re:I'm seeing a resurgence in C by Anonymous Coward · · Score: 0

      C works anywhere (* subject to a massive list of restrictions and caveats).

      Restrictions always apply. That list is shorter for C than it is for any other language.

      Rust kicks your ass if you do stupid stuff well before the code gets in production.

      There are plenty of ways to check C code.

      It's frustrating when you're learning the language but the result is code that simply doesn't fail in the ways that C or C++ does all too frequently - memory leaks, dangling pointers, data races etc.

      These are problems with the programmer, not with the language. A programmer who makes code with such defects will find ways to make code in Rust or any other language fail.

      And perhaps people will stick with C longer that Rust. That doesn't make much of an argument for a library being written right now. Nobody would backport a Rust library to C. The rust compiler will exist as long as C does.

      That is irrelevant when it is no longer supported. With C, you have almost complete certainty that you can use the code for many decades to come. With Rust, it is very doubtful that any supported tools will still exist in ten years.

    21. Re:I'm seeing a resurgence in C by DrXym · · Score: 1

      There are plenty of ways to check C code.

      Yes. An entire cottage industry of linters, post mortem analysis tools etc. to try and figure out what your code is broken. Too bad if that happened in production on a customer machine and now they're pissed and you're going to spend hours trying to isolate why the code is leaking / racing / crashing because of it.

      Code that wouldn't have been broken in the first place or neded to have been fixed if the compiler could catch it. Which is what Rust aims to do insofar as it can.

      These are problems with the programmer, not with the language. A programmer who makes code with such defects will find ways to make code in Rust or any other language fail.

      No, they're problems with the language. Even the most seasoned, experienced C and C++ programmers fall afoul of these issues. Don't pretend you don't. I write C and C++ all day long and I still waste days debugging stupid shit that shouldn't have happened. And of course seasoned, experienced C and C++ programmers don't become that way without writing a LOT of bugs.

      That is irrelevant when it is no longer supported. With C, you have almost complete certainty that you can use the code for many decades to come. With Rust, it is very doubtful that any supported tools will still exist in ten years.

      Why is it doubtful? That's you projecting when there is no indication that Rust is losing popularity.

  11. My problems programming in C aren't C related. by Rufty · · Score: 3, Interesting

    They're much more like: "Why does processor X on board Y rev1 have I2C on those pins, but on rev2 accessing those causes a reboot. Who thought that was a good idea? Can I LART them? And how can I detect board version in software?"

    --
    Red to red, black to black. Switch it on, but stand well back.
    1. Re:My problems programming in C aren't C related. by serviscope_minor · · Score: 2

      And how can I detect board version in software?

      Try accessing the I2C pins. If you get a reboot then you know you're on rev 2.

      --
      SJW n. One who posts facts.
  12. The problem with the metric by isj · · Score: 3, Informative

    "i-programmer suggests this could just be an artifact of the way TIOBE calculates language popularity (by totaling search engine queries). "

    The TIOBE index is not based on the number of queires (see http://www.tiobe.com/tiobe-ind...).

    It is based on the number of results on the query " programming" in multiple search engines.

    So the TIOBE index is "how much has been written online about "

    1. Re:The problem with the metric by Raenex · · Score: 1

      So the TIOBE index is "how much has been written online about "

      And even that simple measure is subject to false positives (like "C" being a common letter), and the results are "tuned" by TIOBE in an undisciplined manner to try to overcome this and other various problems with using "number of hits".

      There are other measures of language popularity, including job offers, books, forum messages, etc. Using TIOBE as a single source and not trying to correlate with these other measures is a waste of time.

  13. Does it really matter? by inflex · · Score: 1

    C isn't really used / chosen any more to participate in the international dick-waving contest. I hope in many ways C is falling out of favour with people just trying to "be cool" or using it for tasks that it's ill suited for.

    Regardless of C falling in popularity (if legitimate) it's unlikely to be buried any time in the next 50 years given its use in the core of everything from OSs to 1K microcontroller firmware.

    1. Re:Does it really matter? by slashdot_commentator · · Score: 1

      Regardless of C falling in popularity (if legitimate) it's unlikely to be buried any time in the next 50 years given its use in the core of everything from OSs to 1K microcontroller firmware.

      Just like COBOL, although I still think that COBOL programs will decline in percentage of business computing as time passes. As a sidenote, I find it sad that C is used in 1K microcontroller firmware. Where would it payoff in either space efficiency or developer "friendliness"?

      --
      There is no America. There is no democracy. There is only IBM and AT&T and DuPont, Dow, General Electric, and Exxon
    2. Re:Does it really matter? by inflex · · Score: 2

      C for modern microcontrollers is a good mix. Easy to access bit-level operations (port control, bit bashing etc) but providing structured programming framework with easier debugging (libraries, function calls, interrupts, even portability to other architectures).

      I code ASM for quite a few when needed (ie things like the Attiny5/10 due to stack limitations ) but realistically doing it in C makes the end-to-end development process a lot smoother.

      The compiler will out optimise the human in almost all cases, and if you have a specific block that you absolutely have to code in ASM then you can simply inline it within the C. If you need to ilk out that last few bytes in the flash then it's often cheaper to bump to the next uC size than pay someone to stuff around for days trying to out optimise (most optimisations will tend to be through algorithmic / process changes), not to mention dealing with the inevitable quirks/pains when someone tries to modify it.

    3. Re:Does it really matter? by slashdot_commentator · · Score: 1

      I look at computer languages as a designed tool to best express what the programmer wants accomplished. If the programmer has to conform to the tool, or recreate the wheel every time they program something, or have to relearn how to do things in the language in order to do something useful, then its not a good tool/language. C has the ability to interface with assembly, and it has some higher level abstractions which makes programming easier than assembly. But for a 1K chip, you probably have to discard stuff like stdio just to get code to fit in that space. And while its easier to get a C programmer to do something useful for that chip (because at least they know C), that C programmer will probably have to learn a boatload of esoterica (ways of doing things) for that environment to be an effective developer. If the programmer is the least bit sloppy, the C compiler will allow a completed binary to be larger than the available working environment. Therefore, C is not a language defined to help a programmer create code while the language helps manage the environment's constraints. (I wish I knew what the term was...) Ideally, there should be language for 1K chip environments to significantly ease development, but I guess assembler would be the only alternative that could fit the bill (unless you can use FORTH).

      --
      There is no America. There is no democracy. There is only IBM and AT&T and DuPont, Dow, General Electric, and Exxon
  14. Betteridge's law by fnj · · Score: 3, Insightful

    Betteridge's law of headlines. Answer is no. HELL no. Hell no, you royal asshole. Discussion terminated. OK?

  15. Reasons: standards, size and man pages by bsDaemon · · Score: 1

    C is a very small language with a modest standard library. The language itself has ANSI and ISO certifications. The standard C library is largely defined by POSIX. I con't have to hold much in my head by way of language constructs or reserved words, etc. and any other programming languages derived their syntax from C, so it will get reenforced often (except the weird ways to use pointers).

    If I have a question about a standard libc function, the man pages will be there on my systems whether it is FreeBSD, Solaris or Red Hat. Most of the time, a question about C can be equally expressed as a question about Unix-like systems because of this.

    C and POSIX are well established and have been through a rigerous standards process, so unless you're interested in a fancy new compiler feature like SafeStack on clang/llvm, you don't really have a lot to learn or relearn once you have it down. No one is about to change how C represents strings or any of the like between versions of compilers for reasons of "just because," though. You may need to look up the specifics of a third-party library if it didn't come with man pages, but that might not show up as a search about C.

    Other languages with huge base libraries which aren't part of the OS's standards definition, multiple programming paradigms, lack of standards causing if shifts between versions, etc., are almost certainly going to get more people heading to Google because they have to.

    1. Re:Reasons: standards, size and man pages by Anonymous Coward · · Score: 0

      The language itself has ANSI and ISO certifications. The standard C library is largely defined by POSIX.

      This is a bit of a tangent but there is a difference between the ISO-C library and the POSIX standard library.
      ISO-C is more focused on portability and efficiency while POSIX requires a larger ecosystem but provides a larger portable feature-set.

      For example an ISO-C compatible library may have file handles that have optimized block read and write that utilizes hardware DMA for fwrite() and fread().
      In POSIX it is required that all file operations at some point go thought fputc() and fgetc() so that it is guaranteed that the behavior is consistent even if fputc() and fgetc() is patched. It also makes it so that you can follow file access through a single point.

      It is certainly possible to write a library that is both POSIX and ISO-C compliant, but then you don't get to benefit from the parts that ISO-C intentionally have marked as undefined or implementation-defined for performance or portability to obscure systems.
      If you want to write a program that sets the baud-rate of a serial port then you have to go for POSIX since ISO-C doesn't provide a portable mechanism for that.
      OTOH there are plenty of systems with serial ports that doesn't have a POSIX-compliant library for them so you might not benefit from it anyway.

    2. Re:Reasons: standards, size and man pages by bsDaemon · · Score: 1

      You're right, but given that I was typing with my thumbs first thing in the morning before coffee, you get the point I was making none the less.

    3. Re:Reasons: standards, size and man pages by gweihir · · Score: 1

      Indeed. And maybe the one most important thing about C plus Unix is that the number of special things you need to learn and understand is limited.

      Sure, once you tackle, say, socket programming for the first time, it is tricky and obscure. But once you have it, it will stay the same forever, and you do not need to re-learn it all the time because every more abstract language hides features, translates behavior and adds its own things. So far I have not found any abstraction of such concepts that did not make things worse, once you moved past toy examples.

      Hence, sure, C has a really steep learning curve. But it stops pretty soon and then you need to understand algorithms and concepts and the problem that you want to solve, and C is merely the tool that does not stand in your way, unlike so many other programming languages.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  16. Maybe. But what's the point of your question? by Qbertino · · Score: 1

    C is still basically the most widely used assembler 2.0 and just about everything we use is built with C.
    Yes, there is C++ and entire stacks built on that, but I'm not talking about Windows. In the global context, Windows is somewhat of an exception.
    The C familly of languages is alive and well and the C-fans building our systems we work on still seem to think it's the best tool for the job.

    Until someone replaces the entire toolchain with a new language like Go or Rust and people from the format like Linus Torvalds start building systems with it, C might fluctuate in general popularity, but it won't go away.

    --
    We suffer more in our imagination than in reality. - Seneca
    1. Re:Maybe. But what's the point of your question? by Anonymous Coward · · Score: 0

      > The C familly of languages is alive and well and the C-fans building our systems we work on still seem to think it's the best tool for the job.

      Yeap, the family of languages is alive and well. But that people still use C to write critical software is pretty awkward. They obviously realize that C sucks, or they would not drag in gnu C extensions left and right to gloss over the short comings, but they still can not be bothered to look for a new language. And some of these idiots (systemd crowd) insists on using class and other C++ keywords so that nobody ever gets the idea to move the codebase over to C++. That would get rid of a ton of helper code and make the cleanup handling so much nicer and would not even cost performance.

    2. Re: Maybe. But what's the point of your question? by Anonymous Coward · · Score: 0

      No, kid, those of us who write life safety critical applications use C because it's verifiable. Your cute new object oriented languages are great for applications with GUIs that aren't important, but when it actually has to work, almost everybody in the world uses C or ADA.

    3. Re:Maybe. But what's the point of your question? by gweihir · · Score: 1

      Rust and Go cannot cut it. When you really need full control, they are just as unsafe as C, but they are not as clean or clear.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    4. Re:Maybe. But what's the point of your question? by EmperorOfCanada · · Score: 1

      When I hear someone blah blahing about either of those languages in a serious way, I just think, "Good luck finishing any project bigger than a year end university project." Then good luck when both of those languages slip into obscurity. And good luck finding experienced programmers in either of those languages. And good luck finding commodity tools for either of those languages like Coverity.

    5. Re:Maybe. But what's the point of your question? by gweihir · · Score: 1

      It is the "Silver Bullet" mindset. Its proponents think that if they just had the right magic tool, all problems would go away. Well, Brooks published "No Silver Bullet" in 1986, and these people are not only clueless and incompetent, they are unaware of history. This is just as true today as it was back then. There is no silver bullet, no magic language or tool that will ever make a wannabe a competent engineer. On the other hand, competent engineers can be slowed down by sub-optimal tools, but that is about it.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    6. Re:Maybe. But what's the point of your question? by Anonymous Coward · · Score: 0

      Have any of you guys who keep posting the "C is a portable assembly language" mantra taken a look at the AMD x64 machine code generated by a compiler? Assembly/ISA machine code is definitely a distinct architectural layer below C or any other HLL.

    7. Re:Maybe. But what's the point of your question? by EmperorOfCanada · · Score: 1

      Have spent, am spending, and probably will spend a good chunk of my career: trying to convince people not to use silver bullets, to stop using the silver bullet, or cleaning up after their silver bullet has given everyone lead poisoning.

      My present fight: Sencha. What a bleak pile of silver coated excrement that product is. You will be 60% in the first 10% of your project. But you will never ever get past about 70% done unless you allow your definition of done to become very fuzzy. The key to their success is that if you look at any given problem that a team might encounter with Sencha there is a Sencha solution that looks good on the surface; except that in the context it was a Sencha workaround that required the creation of the problem in the first place; thus solving it becomes impossible without breaking something else. Thus the solution to any given problem soon becomes mutually exclusive to actual forward progress.

      It becomes the scenario you are stuck in the mud and after spinning your tires for a while forward, some "expert" will suggest reverse. Except that the only real result will be spraying mud in another direction.

      I just give up arguing with Sencha religious zealots who then defend many of its major defects as virtues. For instance there is only one real look and feel and that is from Windows circa 1995. Zealots will say that this is what most customers are comfortable with and it saves development teams from having to make design decisions. Or if you point out that it is slow as crap running uphill, they will say, "Any enterprise user will have new hardware."

  17. No one owns it by Anonymous Coward · · Score: 0

    The reason companies don't like C is because no company owns it. Java is proprietary. They love that stuff.

  18. Not again by prefec2 · · Score: 1

    TIOBE index ist not significant for the popularity (what ever that may be) of programming languages.

  19. Re:We're all programming in Machine Code by truedfx · · Score: 5, Insightful

    C compilers haven't been written in machine code or even assembly for a long time, aside from a rare few. They've been written in C themselves for a while, but today's most common C compilers are written in C++.

  20. Re:Fuck You New Slashdot Owners, Fuck You by EmeraldBot · · Score: 4, Insightful

    You're so busy fucking yourselves, maybe all you need is a good hearty fuck you to shut your stupid ass the fuck up.

    Really contributes to the discussion, a fantastic way to convince someone you are a reasonable person with a well thought out position.

    Why don't you go ask mother fucking ANSI what they think about C's popularity?

    I'm not sure what ANSI is supposed to help us, all they do is set standards. May as well as IEEE what they think of TCP's popularity.

    Why don't you go around and check to see what code is compiling and executing?

    This is so vague as to being entirely meaningless, but alright. Javascript is considered the world's #1 compiled language. Java bytecode comes after. Maybe Shell scripting or Python after that. Aside from how asinine and useless those measures are, since they tell you nothing about its popularity with developers, it seems awfully strange to pick a fight with a language that is only ever compiled once and never formally executed in its original form.

    Why don't you fucking just learn a tiny little bit about the history of programming languages and their derivatives

    I'm not sure what the history of programming languages is supposed to do about what today's measures are, given that how it scored in the past has little bearing on how useful it is today. I'm completely confused as to what you even mean by that, or why you even put it in here. Perhaps, because like the rest of your post, it was entirely devoid of any rational point or argument?

    your stupid caking piehole about shit that you shouldn't even be propagandizing about, stop dumbing people the fuck down, and just to reiterate, the the fucking holy hell up?

    You state things much more bluntly then I would like, but at its core, perhaps yes. If you have nothing to contribute, take your meds, knock yourself out, and stop vomiting yourself all over this page.

    --
    "Set a man a fire, he'll be warm for the rest of the night. Set a man afire, he'll be warm for the rest of his life."
  21. No. by Anonymous Coward · · Score: 0

    Why these elaborate posts to get dead simple answers? Are people that starved for attention?

  22. Re:We're all programming in Machine Code by Anonymous Coward · · Score: 1, Insightful

    C is a portable shorthand for assembly language.

  23. Submitter is clueless - 99.9% of web sites run on by raymorris · · Score: 5, Insightful

    Quoting TFS, "t is not a language that you think of while writing programs for popular fields such as mobile apps or websites". Submitter clearly doesn't have much idea how web sites work. For web sites, your browser (a C or C++ program) sends a request through routers running Cisco iOS (a C program) to a web server such as Apache (a C program), which may run a module such as mod_php (a C program) which in turn probably runs a library such as ImageMagick (a C program) which generates the content. The content is fed back through the web server (still C) to your browser. For larger sites, there is often a proxy in the middle, such as Squid (written in C) or mod_proxy (more C).

  24. Sure it is by aglider · · Score: 1

    Just like real programming!

    --
    Sent as ripples into the electromagnetic field. No single photon has been harmed in the process.
  25. Ehh... by EmeraldBot · · Score: 1

    I respect the TIOBE index's goals, and I wouldn't be surprised if C actually is declining. It doesn't scale well with modern day projects, is a frightful source of bugs, and can be pretty tricky to work with between OS's. That being said, C is still an extraordinarily useful language, and I wish we taught it and encouraged younger programmers to learn it; for its many faults, it also has many virtues, especially its simplicity. Combined with its power and massive supply of existing software, it'd behoove a new programmer to at least consider learning it, even if it really is declining in popularity (always an iff-y proposition with an index that's fundamentally slanted against languages requiring little documentation or online consults).

    --
    "Set a man a fire, he'll be warm for the rest of the night. Set a man afire, he'll be warm for the rest of his life."
  26. Re:We're all programming in Machine Code by Anonymous Coward · · Score: 1

    Better hurry before it's all gone,.

  27. Re:C is dying because its slow by Anonymous Coward · · Score: 0

    gc(); You know you can invoke garbage collection on demand, right? gc(); Invoke garbage collection after a certain number of loop iterations, gc(); before waiting for input, gc(); or wherever your algorithm is least busy doing stuff. gc();

  28. Re:C is dying because its slow by Anonymous Coward · · Score: 0

    and it also likes to invoke itself, basically whenever it wants, so it can drop user input, or have horrible lag.

    If I have to manipulate the garbage collector, why not just manage memory myself?

    Oh wait, that's "hard", so why not let java do it for me, at a "small" performance penalty?

  29. Re:C is dying because its slow by Anonymous Coward · · Score: 0

    Or you could stop waiting for low memory conditions to force garbage collection, and call gc() in Java like you would call free() in C.

    When I write an event loop in Java, I call gc() at the bottom of the loop. I call gc() after replacing the contents of a temporary buffer and before processing the contents of the buffer. Basically whenever I know I've accumulated garbage in memory, I call gc() to collect it for me, when I decide the time is convenient for garbage collection.

    Stop being lazy and take some responsibility for your memory usage.

  30. actually a good metric by aepervius · · Score: 4, Insightful

    A language is thriving or dying by the number of inexperienced developper trying to learn it. If no inexperienced cev learn it... it is dying. See the experienced dev of today were the noob of yesterday. If everybody is learning c# or java it is a pretty good indication of what the future of c, c++ will be. For reference see cobol. But rejoice , a dying or less used language means that for us the kldr gen, assured contracts works.

    --
    C. Sagan : A demon haunted world:
    http://www.amazon.com/gp/product/0345409469/
    visit randi.org
    1. Re: actually a good metric by Anonymous Coward · · Score: 0

      Web apps and mobile apps are not needed. You can order your pizza by phone. Young developers that develop web and mobile apps are not needed either; they re scum.

      When you want something that works, it is C orFortran or C++

    2. Re: actually a good metric by Anonymous Coward · · Score: 0

      Never programmed professionally in COBOL myself, but it's an unfortunately great example of "the cool kids don't use it so it must suck" mentality that permeates the facebook generation.

      COBOL is an absolutely amazing language for doing business problem solving. Very standardized, practically self documenting, and easily read even if you don't write in it. Combine it with a good transaction monitor and you've got a tool for high volume business work that still can't be beaten in terms of performance and reliability.

      Now, it kind of sucks for UI work but if one wrote business logic modules in COBOL and called them from a language/tool that is good for UI work you're golden. A lot of COBOL shops do exactly that.

      It's also not awesome at non-business type applications, which is reason 1 why college age programmers don't like it because they're all trying to invent the next billion dollar phone app or other nonsense like that. In addition, because it's been popular since the 60s and reinventing the wheel is SOP for developers these days they don't get to do that so much. Hell, we're just getting somewhat passable with virtualization and reliability using huge stacks of servers and gigantic cloud datacenters that basically do what mainframes have been doing for decades. But it's on the Internet so it must be cool. Go look up "timesharing" and why it sucked to know where all this is going, btw.

      Classic case of marketing and hype vs objectivity.

  31. Re:C is dying because its slow by Anonymous Coward · · Score: 0

    So why be even lazier and let "java do it for you?" at a "small" performance penalty. If I have to choose when to call gc(), why not do it the proper way?

    The GC is not deterministic, it runs whenever it wants, calling gc() just means it may/may not free whatever a real programmer would have done.

    Don't get me wrong, Java is great for students and programmers of limited skill, enabling them to crank out something that "works" without too much skill/trouble.

    It's a great sandbox environment, isolating people from complicated things, but more abstraction and "n00b safety" lead to a speed penalty.

    Java is like training wheels, but once you get used to them, they become very hard to live without.

  32. Yes C is dying by Anonymous Coward · · Score: 1

    All the new programmers should go learn $HOT_SHIT_LANGUAGE and leave C alone. This will help ensure that those that actually know C well will always have a job.

    1. Re:Yes C is dying by Proudrooster · · Score: 1

      If I had mod points, you would get them ALL! Yes, go learn Python or Ruby on Rails or Visual Studio or Swift.

    2. Re:Yes C is dying by gweihir · · Score: 1

      Hahaha, joke is on you! I use Python with embedded C modules for most things I do these days. Yes, if you are really skillful, you can have the best of both worlds.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    3. Re:Yes C is dying by Aighearach · · Score: 1

      Luckily most of the youngsters learning C these days call it Arduino and they won't even know to compete for the jobs! ;)

    4. Re:Yes C is dying by Anonymous Coward · · Score: 0

      I always wanted to program in the Visual Studio language!

  33. Re:Submitter is clueless - 99.9% of web sites run by JaredOfEuropa · · Score: 1

    When you're writing a mobile app or building a website, you are not writing compilers, browsers, router firmware, web servers, PHP interpreters, proxies, or even libraries for 3rd party use. If you are writing libraries, chances are that you're writing these for your own use or your team's, probably in the language you're building the rest of the app or website in.

    Languages that do come to mind in these fields are Objective-C, Swift, C# or Java for mobile apps, or Javascript, Java, PHP, Ruby or C# for web development (just my personal list, I am sure there are many others). You can use C for both, but personally I don't know anyone who does. PS. I don't count the object-oriented variations of C as "C".

    --
    If construction was anything like programming, an incorrectly fitted lock would bring down the entire building...
  34. The Internet of Shit depends on C by Anonymous Coward · · Score: 0

    Well, the whole Internet of Shit depends on C programmed Linux enabled ARM processors, so one could wish for it to be dying, but it is very unlikely.

    1. Re:The Internet of Shit depends on C by Half-pint+HAL · · Score: 1

      Well, the whole Internet of Shit depends on C programmed Linux enabled ARM processors, so one could wish for it to be dying, but it is very unlikely.

      Are we sure that's true? These Linux-enabled ARM processors are more powerful than the PC I was programming in interpreted languages at the turn of the century, and most of them are doing very simple things like turning heaters or lights on and off, which isn't computationally expensive. Small indy "things" are often built around the Raspberry Pi, because that's what the prototype was built on... and probably in Python. If I was building a garage door opener out of a computer with enough grunt to run four simultaneous games of Quake, I don't think I'd really care about optimising my code to that extent.

      --
      Got them moderator blues I blieve I walk out the do', With these mod-points I been gettin', I 'most never post no mo'
    2. Re:The Internet of Shit depends on C by Aighearach · · Score: 1

      traditional embedded devices that are DRVs and similar types of boxes generally had linux, but with IoT it is more normal to forgo even having an OS, or using something really lightweight like FreeRTOS. Even the proprietary SDKs are generally built on top of FreeRTOS or similar.

      No surprise that you blame a category of things for whatever your beef is, and also don't know the details.

  35. Re:C is dying because its slow by Anonymous Coward · · Score: 0

    Because not everything needs speed, but wasted memory is wasteful. I have a simple web crawler I wrote in Java, it spends most of its time in Thread.sleep and I use System.gc to manage its memory footprint, so other more important processes don't have to compete with it for memory.

  36. Bah... C is still king baby by Proudrooster · · Score: 2

    C is not dying. Most of the libraries that are used behind the scenes to support Swift, Objective-C, Java, Python, Perl, LINUX, C#, and New Embedded Platforms like PI, are all written in C/C++.

    C scales as well as any other language as long as you use C++ and objectify everything so it can fire it up in containers. You can't use global variables anymore and everything needs to be encapsulated into an object. It pains me to do this, but with the shift to the cloud there is no choice (please prove me wrong).

    C is the bed-rock of all that is digital. If anything needs to die it is Java. The new owner of Java doesn't seem to be taking care of it like Sun Microsystems used to. Yeah, I am looking at your Oracle.

    Consider how many C libraries this Slashdot page passed through just to get to your eyeballs.

    1. Re:Bah... C is still king baby by Anonymous Coward · · Score: 0

      Mr. Proudrooster, what you've just said is one of the most insanely idiotic things I have ever heard. At no point in your rambling, incoherent response were you even close to anything that could be considered a rational thought. Everyone in this room is now dumber for having listened to it. I award you no points, and may God have mercy on your soul.

    2. Re:Bah... C is still king baby by phantomfive · · Score: 1
      Wait, why do containers require you to not use global variables?

      If anything needs to die it is Java.

      If Java dies, it will be replaced by C#. So not much change.

      --
      "First they came for the slanderers and i said nothing."
    3. Re:Bah... C is still king baby by Anonymous Coward · · Score: 0

      You want to get rid of Java? Let 5 junior programmers loose on a 200k loc C++ project, and on a 200k loc Java project. Who do you think is going to do the most damage?

    4. Re:Bah... C is still king baby by Anonymous Coward · · Score: 0

      What is Java's JVM written in? C
      What is the Python interpret written in? C
      What is C# written in? C and C++
      What is Perl written in? C
      What is Swift written in? Objective C and C++
      What is the Linux kernel written in? C

      So as you can see, the Roosterman is clearly incorrect on C.

      And Yes! Java should die in a fire. Java is not slow once it is running, it just has to load the entire JVM (written in C) and all of the libraries before it can get it's fat ass moving.

      See this brilliant video:

      Forgetting Java: Why Java Should Die in Flames and Take its Developers Along by Piotr Limanowski
      Published September 3, 2015 in Programming

      Video available from here: https://www.youtube.com/watch?...
      Java is old. Java is verbose. Java is ugly. Java is mocked and ridiculed by everyone and their dog. Hell, Java is dead. Well it's not but I'm preaching to the choir. Or am I? However convenient to say so, it's not exclusively Oracle to blame for Java's current state of the art. Java developers are guilty of laziness (the wrong kind), not questioning the tools they use (wrong again), following patterns (pretty much the right kind) they believe are blessed upon them yadda yadda yadda. Yet the communities around languages we find to be even lesser than Java offer world of a difference. The talk shows the tools, experiences and mindset we lack in the Java world. The virtues present elsewhere but needed here for Java to wipe the "enterprise-grade" solutions off the face of the world. Let's do this people. Let's do the right thing and get rid of the "enterprise" Java developers.

    5. Re:Bah... C is still king baby by EmperorOfCanada · · Score: 1

      I really hope that Java continues to thrive. There is a certain type of pedantic bureaucratic programmer that finds a happy home in Java. I really don't want them leaving that steaming rathole and bringing their stink into other languages. Someone mentioned that they would go to C# but that is more of a language for those who have no souls and are willing to let MS do their thinking for them. Java allows them to be all self-righteous while the rest of us can completely ignore them. When I see the words JVM I just walk away in the same way that I wouldn't buy a car made in Russia.

  37. Inevitable decline in popularity... by Harold+Halloway · · Score: 2

    ...since D was released.

    1. Re:Inevitable decline in popularity... by Anonymous Coward · · Score: 0

      I went straight E and never looked back.
      The world feels so much better now.

    2. Re:Inevitable decline in popularity... by __aaclcg7560 · · Score: 1

      There's F# if you want to take your mojo up to 11.

      https://en.wikipedia.org/wiki/F_Sharp_(programming_language)

  38. Re:We're all programming in Machine Code by gtall · · Score: 0

    Different languages represent different paradigms on how to structure solutions to problems. Without those paradigms, you'd still solve every problem like you would with assembly code or C. Machine code and C as implementation mediums is beside the point.

  39. C is only dying in the buzz department by JoeyRox · · Score: 3, Insightful

    C is not the next great thing. But is still the one of the best things and will always be a workhorse.

    1. Re:C is only dying in the buzz department by gweihir · · Score: 1

      Unlike languages targeted at barely competent programmers (like Java), C demands insight and understanding or things break very fast. That will always limit its popularity. On the other hand, those few that have the skills will continue to use it, because nothing else gives you remotely the same power and simplicity. Sure, glue-code where performance does not matter is better written in a scripting language like Python, but for the actual work nothing beats C written by somebody that knows what they are doing.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    2. Re:C is only dying in the buzz department by Aighearach · · Score: 1

      The buzzy parts got renamed "Arduino."

  40. Re:We're all programming in Machine Code by JoeMerchant · · Score: 2

    This statistic might just mirror my thinking on the "popularity" of C. Are we talking market share, or number of users?

    I'd guess that the number of users is remaining constant, or slowly growing. The market for users of programming languages continues to expand rather quickly, so it's entirely possible that C's market share declines while its number of users continues to grow.

    Then you have the college grad resume effect: every language they ever wrote two lines of code in ends up on the resume... what does lines of code mean, anyway? Can we have a metric for number of hours that end-users execute code that was written in each language, coupled with another metric for number of hours that people spend writing and maintaining that code? Is there any way to untangle that from the number of hours spent in requirements gathering sessions and showing prototypes to people who don't know what they want? I don't think so.

  41. Re:We're all programming in Machine Code by JoeMerchant · · Score: 0

    C is a portable shorthand for assembly language.

    C was conceived as a portable shorthand for assembly language. It has evolved into its own beast over the decades - especially when you include C++.

  42. Re:Delphi #11's written in Object Pascal by JoeMerchant · · Score: 5, Funny

    Calling out MSVC as the reference C compiler for execution speed is like calling out a parade float as the performance reference for internal combustion powered vehicles.

  43. Re:We're all programming in Machine Code by Big+Hairy+Ian · · Score: 0

    How is this modded up? Stroutsup first wrote "C with Classes" in C and then used that to write C++ so C++ is technically written in C see here https://www.quora.com/In-what-...

    --

    Build a Man a Fire, and He'll Be Warm for a Day. Set a Man on Fire, and He'll Be Warm for the Rest of His Life.

  44. It depends by hackwrench · · Score: 1

    It depends. Are we talking in absolute terms or per capita. C is still the best tool for the things it has always been used for but as programming becomes more mainstream, the percentage of people who are interested in such tasks is going to shrink.

  45. C is for mission critical software by funky_vibes · · Score: 1

    C is for mission critical software. Most other compilers, even C++, are too big to be verified properly.
    The demand for things that don't randomly crash has gone down, we take bugs for granted now, therefore C naturally loses popularity in favour of languages that don't take coding so seriously.

    1. Re:C is for mission critical software by Anonymous Coward · · Score: 0

      Easier to track down bugs using C++ because of its OO features. Even large AI systems like a chess engine is written in C++, It has lesser code and robust. C is difficult to debug. Just look at the open source engine Stockfish which is the number one chess engine. It is written in C++

    2. Re:C is for mission critical software by Anonymous Coward · · Score: 0

      Easier to track down bugs using C++ because of its OO features.

      You have never actually debugged C++ code, have you? The language is basically designed to obfuscate bugs.

  46. Re: We're all programming in Machine Code by Anonymous Coward · · Score: 0

    That's only true for higher level languages which restrict you to a small number of approaches. Anything you can do in a high level language, you can do in C, but the reverse is not true.
    But it is often faster or simpler to use a higher level language, which is why there are so many and why they have become so popular.

    To use a car analogy, C is like having a full blown machine shop and garage. A higher level language is more like a tire change shop or an oil change garage- they only do one thing well but if all you need is a tire rotation it's a great option.

  47. C is slowly being replaced by C++ by cpghost · · Score: 4, Insightful

    C isn't dying, but I think that it is being slowly replaced more and more by C++. Not all of a sudden, but when new code gets added, it is just more convenient to use std::string, RAII, the whole C++ Standard Library. Especially since C++11, C++ and its library have matured a lot to actually become useful and have you write beautiful and fast/efficient code, thanks to move semantics. So no, C isn't dying, it is morphing into C++11 and later. Even for embedded and kernel-level programming: check out recent projects: many use C++, carefully avoiding features like virtual functions that would slow down running time. It is as good as C can get, only better.

    --
    cpghost at Cordula's Web.
    1. Re:C is slowly being replaced by C++ by Anonymous Coward · · Score: 0

      C++ is a nice language, but it will probably die off before C as it is slower and more resource demanding, making it less applicable for small microcontrollers, kernels and other barebone stuff. C++ is fast and powerful, but other languages are improving in these areas, while outshining it others. Either way, both languages are likely to outlive both of us.

    2. Re:C is slowly being replaced by C++ by lucasnate1 · · Score: 0

      The real problem with C++ is not slowness, but being too complex and unpredictable. I think that what will happen is that C will get the few good features from C++, and the rest will die.

      One such example is the "cleanup" attribute in gcc, and I suspect that unique/shared pointers will find some way to become a part of C language as well, either through an extension or through an official standard.

    3. Re:C is slowly being replaced by C++ by Dutch+Gun · · Score: 3, Insightful

      The real problem with C++ is not slowness, but being too complex and unpredictable. I think that what will happen is that C will get the few good features from C++, and the rest will die.

      You're correct that C++ is typically no slower than C, but it seems very unlikely to disappear anytime soon. There are probably billions of lines of C++ out in the real world. It will never be the most popular language, but it's a very significant one, and will be for quite some time. C++ is used when you need the performance of a to-the-metal compiled language like C, but need better abstraction models for large, complex systems. But unlike some other languages, you typically pay little to nothing extra for these abstractions, as the burden is shifted to the compiler. There are many times when performance really does matter, and you can't simply afford to throw more hardware at a problem, such as a very complex application on a single client PC, a videogame console, or at massive scales like in mega data centers.

      If you think C++ is "unpredictable" then you just don't know the language all that well. I'm not trying to sound arrogant or condescending, as it's absolutely a difficult language to learn and especially difficult to master (hell, probably near impossible to master it *all*), but "unpredictable" is how you describe managed memory, not C++. Yes, C++ has a lot of sharp edges as a language. It's ugly, clunky, bloated (aka "feature-rich"), slow to compile, and difficult to master. But it also has a large, mature ecosystem (thanks to its C-based heritage), and damn near every significant CPU or platform has a C++ compiler that supports it, probably topped only by C.

      So really, it's reasonably safe to say that neither C nor C++ are going anywhere anytime soon, thanks partially due to sheer inertia caused their pervasiveness through our critical infrastructure. This fact alone dictates that compiler support will remain a priority among major software companies (Microsoft, Intel, Apple) or projects (Clang, CGG). Add to that the enormous codebases that companies have invested in with both languages, and C/C++'s longevity is even more likely.

      --
      Irony: Agile development has too much intertia to be abandoned now.
    4. Re:C is slowly being replaced by C++ by gweihir · · Score: 1

      C++ is actually a barely usable monster. It adds nothing real except complexity, also because its OO model is fundamentally broken and inefficient. Sure, C can benefit from some libraries like safe string handling, but that is it. So, no, C is not "morphing" into C++ at all.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    5. Re:C is slowly being replaced by C++ by lucasnate1 · · Score: 0

      "If you think C++ is "unpredictable" then you just don't know the language all that well."

      If the language is that complex to learn, it's what I call unpredictable. btw, I've been professionally programming in C++ for several years now, I was chief C++ programmer in the past, and I admit I don't know the language 100% and still get surprises once a while.

      Then again, who knows, maybe it's just me, and nobody else has that problem.

    6. Re:C is slowly being replaced by C++ by Tablizer · · Score: 1

      It seems there are insufficient alternatives around: Something that runs close to the metal, scales up to larger code-bases abstraction-wise, yet has enough high-level protections to avoid easily shooting yourself in the foot through bad pointers or bad type conversions that get past the compiler.

      One probably wants access to the "guts" when actually needed, but otherwise that access is not the default. One has to explicitly tell the compiler, "Yes, I really want to do risky low-level stuff in this block. Please allow".

    7. Re:C is slowly being replaced by C++ by Anonymous Coward · · Score: 0

      It seems there are insufficient alternatives around: Something that runs close to the metal, scales up to larger code-bases abstraction-wise, yet has enough high-level protections to avoid easily shooting yourself in the foot through bad pointers or bad type conversions that get past the compiler.

      One probably wants access to the "guts" when actually needed, but otherwise that access is not the default. One has to explicitly tell the compiler, "Yes, I really want to do risky low-level stuff in this block. Please allow".

      Ada can do all this. Bare metal programming, runs as fast as C. Highly scalable and very maintainable. Its very unfortunate so many are either unaware of it or have wrong impressions based on old hearsay. Ada is fully supported in GCC.

  48. Re:We're all programming in Machine Code by truedfx · · Score: 1

    Nobody was talking about either pre-2000 compilers or about C++ compilers, let alone pre-2000 C++ compilers, so whether those were written in assembly, C, C++, or even Fortran or any other language is not relevant.

  49. Re:C is dying because its slow by Anonymous Coward · · Score: 0

    > When I write an event loop in Java, I call gc() at the bottom of the loop.

    For C, only really bad coders are so insane and lazy to put a malloc/free INSIDE a loop in the first place if it's avoidable.

  50. Re:We're all programming in Machine Code by MobyDisk · · Score: 1, Redundant

    It is modded-up because it is both correct, and insightful.

    ...so C++ is technically written in C...

    No, it is not "technically written in C." At best you could say "in the past it was written in C." But that statement applies to almost everything, and misses the key point. The key point is that compiler writers have moved from C to C++, even for writing C compilers. That is an important indicator of C's popularity and future.

  51. Re:We're all programming in Machine Code by hey! · · Score: 5, Informative

    C was conceived as a portable shorthand for assembly language. It has evolved into its own beast over the decades - especially when you include C++.

    It makes no sense to include C++, just because C++ shares certain elements with C. The design philosophy is completely different. C is a minimalist language. It has acquired more features over the years, like unicode support, but based on demonstrable need. C++ is more prescriptive in its philosophy: these are the features you should be using if you want to be doing object oriented programming.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  52. Re:Fuck You New Slashdot Owners, Fuck You by Anonymous Coward · · Score: 0

    Is this a LKML technical discussion? I thought I logged onto Slashdot.

  53. Re:We're all programming in Machine Code by Anonymous Coward · · Score: 0

    What a crap. Modern C compilers are not written in assembly or machine code. Come on, I can build a C compiler using VB6.

  54. Re:We're all programming in Machine Code by JoeMerchant · · Score: 1

    The fun thing about C++ is that you can write virtually straight C in it (or, port existing C into it) and it works, well - with tiny adjustments here and there.

  55. "Argue w/ the #'s", not I... apk by Anonymous Coward · · Score: 0

    See subject & https://developers.slashdot.org/comments.pl?sid=10092109&cid=53628473/ it's C++ not C involved vs. Delphi/Object Pascal!

    * ... & yes, it's written in ITSELF as I note in the post of mine you replied to.

    APK

    P.S.=> Facts, are facts & truth IS truth - all you have vs. it is unjustifiable downmods https://developers.slashdot.org/comments.pl?sid=10092109&cid=53628161/ + your error it's C involved (not C, it's C++)... apk

  56. Re:Submitter is clueless - 99.9% of web sites run by Anonymous Coward · · Score: 1

    Websites and mobile apps aren't written in C. That the routers use C or the web server might be written in C is irrelevant - when you're writing a web or mobile app, you are interacting with those devices via HTTP, maybe TCP/IP, etc. If you're using library that's written in C, you're using the API bindings for the language you're using. Why would you be thinking of C? Its like arguing that someone who uses Microsoft Excel would be thinking of C because parts of the Windows kernel and Excel itself are written in C.

  57. Re:We're all programming in Machine Code by glenebob · · Score: 1

    I would imagine assemblers are written in C++ as well. Why not?

  58. As with all headlines that pose a question... by Notabadguy · · Score: 1

    No.

    If the fuckwit who wrote this shitpost can't be bothered to do enough research into either the topic or have the journalistic integrity to posit a theory, and instead needs to shitpost a question...

    Then as always, the answer to the headline is no.

    1. Re:As with all headlines that pose a question... by Mybrid · · Score: 1

      Also, why does it matter? Tools are not a popularity contest. Pick the right tool for the job. Haskell has found a niche in MQ and async communication. Okay then. The only discussion on this topic that is relevant is about the applicability of a tool.

      For example, NodeJS is crap. The crap though has nothing to do with the language "Javascript" but the server-side implementation of NodeJS.

      Or PHP. PHP's security model has always been suspect more than that of other languages and yet is a one of the most widely used web platform languages. Again, not the syntax, the PHP interpreter.

      Those or the pertinent discussions. Popularity is for pop culture, not engineering.

  59. Why I Teach C by Anonymous Coward · · Score: 0

    There are several reasons why I teach C:

    -The main operating systems are all written in C (Linux, Windows, Unix - and by extension OsX). My students have compiled kernels, can read and write open source code, and have even experimented with replacing system libraries on their own machines.

    -If an obscure piece of hardware needs to be programmed (Lego EV3, Dexter Pi, etc.), you can bet that there is a C compiler.

    -Students who learn C first have little trouble transitioning to other programming languages. Former students who program in other languages for living recommend that I continue to teach C.

    -There is no licensing cost associated with GNU C/C++.

    -Logic is logic, no matter which way it is sliced. If a student understands conditionals, loops, functions, etc, it really does not matter which language they program with.

  60. Re:Delphi #11's written in Object Pascal by Anonymous Coward · · Score: 0

    Too many bridges burned by Borland... nobody wants vendor lock-in with Delphi anymore. Remember how they dropped Kylix like a hot potato? Or their web designer? I wouldn't touch Delphi again unless it was open source or for hobby projects. But why learn it if I won't use it for a job?

  61. Jobs ads always seem to ask for C/C++ by walterbyrd · · Score: 1

    That is what I seen. I can't remember the last time I saw a job ad for just C.

  62. Re:We're all programming in Machine Code by Highdude702 · · Score: 1, Insightful

    Thank you! Im rather new here compared to you.. but in the 10 years or so ive been coming to this site. ive never seen it as bad as it is now. This is a ludacris post. To even fathom that C will die...

  63. Re: programming tosh by golodh · · Score: 1
    @Big Hairy Ian

    In the end we're all writing Machine Code we've just wrapped it up in a nicer package is all

    Rubbish.

    Toggled in the binary code for any bootloaders recently? Addressed any registers lately in C? Dealt with any vectorising and prefetching in C in the past week? Inserted an NOP's in C recently to keep nasty timing stuff from hapening?

    No? Then you're clearly talking nonsense. The C virtual machine is way different from the processor it targets.

    Just as driving a car is different from dealing with a water-cooled internal combustion engine, a gearbox, a drivetrain, the suspension, brake disks, a chassis and a set of wheels.

    You'd never get anywhere if you tried. Same with assembler, let alone machine code.

  64. Re:We're all programming in Machine Code by slashdice · · Score: 1

    It should be, but there are people who insist on talking about the "C Machine" and "undefined behavior". Unfortunately, most of them are compiler writers and ignore that your code is going to run on an actual computer with actual defined behavior. Result: the compiler goes full retard and "optimizes" away code because somewhere there might be a computer that doesn't use two's complement integers.

    --
    Copyright (c) 1990 - 2014 Dice. All rights reserved. Use of this comment is subject to certain Terms and Conditions.
  65. Popular C or most used language? by Anonymous Coward · · Score: 0

    The programming lanuage used most has to due with where all the jobs are.
    The computers are getting smaller and smaller means that programming languages will have to shift to Assembly/C.
    When you look at a computer watch as a designer the questions should be like this:
    * Amount of hours before a recharge
          Assembly/C = longer battery use
        Java/python = shorter battery use and requires more charging
    * Speed
          Assembly/C = is faster for apps
          Java/Python = takes longer for apps
    * Memory
          Assembly/C = uses less memory with extra memory to spare
        Java/Python = requires extra memory for apps
    * Education
        University = Maybe learn all the different types of programming languages
        Busniess = Maybe use Assembly/C for IoT and small computer devices
      Hobbiest = Maybe use Java/Python or other languages that the Hobbiest wants to learn

  66. I'm calling Betteridge on this one by tietokone-olmi · · Score: 1

    That's to say: no, it isn't.

  67. Re:We're all programming in Machine Code by __aaclcg7560 · · Score: 1

    I would imagine assemblers are written in C++ as well. Why not?

    I'm working my way through an old book to create a Pascal compiler in C. I went with the C edition since it was easier to translate the MS-DOS era code into a modern variant of C than the C++ edition. I'm also learning C to write Python C extensions. Once I'm done with the book, I'll get back to my BASIC compiler in Python.

  68. Re:C is dying because its slow by Anonymous Coward · · Score: 0

    Oh really, Java is memory friendly. So they removed the requirement to specify how much memory it should allocate on start up like an old windows 3.1 application?

  69. More to the world than the Web by PPH · · Score: 1

    hardly suitable for the booming fields of web and mobile app development.

    Perhaps this is so. But embedded apps are largely written in C.

    Some years ago, I ran across a statistic. I'm not sure if its still accurate but: Take all the processors used in personal computing devices (PCs, tablets, phones) and web servers as a subset of all processors, micro-controllers, etc. and calculated that as a percentage. Rounded to the nearest whole percentage point, that number would be zero.

    --
    Have gnu, will travel.
  70. Re:Delphi #11's written in Object Pascal by Anonymous Coward · · Score: 0

    Calling out MSVC as the reference C compiler for execution speed is like calling out a parade float as the performance reference for internal combustion powered vehicles.

    With the giant purple Barney balloon attached?

  71. Re: We're all programming in Machine Code by Anonymous Coward · · Score: 5, Insightful

    It's worse than that. Since they base this on Internet searches, which is a metric only an idiot could think is good, you end up in a situation where dumbed down languages used by dumbed down people who are too stupid to even use those without handholding pump up search volume for those very same languages.

  72. Not for millennials? They will need to find out by Anonymous Coward · · Score: 0

    I can't imagine the future world demanding embedded software and the people trying to solve everything with virtual machine languages. C is a need since always.

  73. Re:C is dying because its slow by Anonymous Coward · · Score: 0

    What? Why? Don't do this. What the hell?

  74. Re:Delphi #11's written in Object Pascal by geoskd · · Score: 1

    Calling out MSVC as the reference C compiler for execution speed is like calling out a parade float as the performance reference for internal combustion powered vehicles.

    It works just fine, and is taylored to people who like to see large numbers in their benchmarks: "This compiler over here has a performance rating of 72 MSVCs, this other one has a rating of 104 MSVCs, and then there is clang with a whopping 463 MSVCs."

    It works for me...

    --
    I wish I had a good sig, but all the good ones are copyrighted
  75. Ah, assembly language by Anonymous Coward · · Score: 0

    Way back in the old days when I was studying Computer Science in school in the 70s, (ah the 70s that decade is what it means to be young) I remember the head of the department being dismissive of assembly language, but I thought it was really cool.

    I still think you have to work with some kind of assembly language, even if it was for an Intel 8080, to really know programming. Of course, a lot of whippernappers (gen Xers, Millenials hmmph!) will say that's wrong. Makes me think of Sheldon Cooper thinking he could swim because he practiced on the floor.

  76. Re:We're all programming in Machine Code by Anonymous Coward · · Score: 0

    Ludicrous. Ludacris is that terrible rapper.

  77. 64bit asm OS by GlowingCat · · Score: 1

    Latest MenuetOS videos: https://www.youtube.com/channe...

  78. Re:We're all programming in Machine Code by hey! · · Score: 4, Informative

    I'm well aware of this, but it doesn't change the fact that C++ is a different language with a fundamentally different philosophy. Adding features to a language is not some kind of neutral operation; it can affect users that have no intention of using those features.

    Were it not for operation overloading the argument that C++ is simply C with classes would be a lot stronger. Then if you came across the expression "a + b", you would know it means exactly what "a + b" means in C: either integer addition, floating point addition, possibly with an implicit typecast on one of the operands. In C++ the "+" might be something else altogether; it might even have side effects.

    This is neither good nor bad, but it's unquestionably different.

    Oh, and by the way, moderators: troll? Really?

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  79. Re:We're all programming in Machine Code by dargaud · · Score: 1

    This is neither good nor bad, but it's unquestionably different.

    I beg to differ: it IS bad. Because when you read a+b, you have NO idea what may be happening. And this applies to ALL the operators. And the effect of the overloading can be completely different for various types. If participating in the underhanded C contest is not too hard, there's no need for an underhanded C++ contest because it'd be beating a dead horse.

    --
    Non-Linux Penguins ?
  80. Re:We're all programming in Machine Code by hey! · · Score: 2

    I see it as a mixed bag. If you are extending the addition operation to non-built-in types like matrices or complex numbers it's a good thing, although you can obviously screw it up. If you're implementing some kind of Abelian group or algebraic ring it's a good thing. Even if you're just using operator overloading in some way that makes intuitive sense, like string concatenation ("a" + "b" == "ab") or repetition ("a" * 3 == "aaa") or comparison ("a" "b" == true), I see it as a good thing.

    But operator overloading obviously gives a great deal of scope for sloppiness and obscurity.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  81. Alt: "C doesn't require as much study as others" by Ungrounded+Lightning · · Score: 1

    A language is thriving or dying by the number of inexperienced developper trying to learn it. If no inexperienced cev learn it... it is dying.

    But your thesis ("[web searches for help on a language is] actually a good metric [for language viability]") doesn't follow from that assumption.

    Other possible explanations include:

    "The C language is easy enough to understand, compared to others such as java, that references to documentation and searches for arcane knowledge about it, even by noobies, are rarer."

    "The ordinary documentation of C is clear enough that web searches are rarely needed."

    and so on.

    This doesn't mean that C use ISN'T declining. But it does mean that additional measures using different metrics would be required to determine that this result isn't just an artifact of the methodology.

    --
    Bantam Dominique roosters crow a four-note song. Once you've heard it as "Happy BIRTHday" you can't NOT hear it that way
  82. Re:We're all programming in Machine Code by serviscope_minor · · Score: 1

    Adding features to a language is not some kind of neutral operation; it can affect users that have no intention of using those features.

    Having had to debug someone's FORTRAN code which just happened to be written in C++[1] I can assure you that some people are quite impervious to language features.

    [1] It's the old quote, you can write FORTRAN in any language. Old school numerics types of any age do this.

    --
    SJW n. One who posts facts.
  83. Re:We're all programming in Machine Code by serviscope_minor · · Score: 3, Insightful

    I beg to differ: it IS bad. Because when you read a+b, you have NO idea what may be happening

    I beg to differ with you!

    If you see the function add(a, b), you have NO idea what may be happening. And this applies to ALL the functions. In C++ a+b simply means operator+(a,b) IOW it's a function with a funny syntax just like any other.

    And the effect of the overloading can be completely different for various types.

    Well of course, adding two floating point numbers is a very different operation to adding two integers. Totally different instructions. The former can even generate a floating point exception and crash your code if you've set the exception flags. And then there's adding two signed inegers. You can always safely add unsigned types. If you add signed ones, overflow invokes nasal demons.

    --
    SJW n. One who posts facts.
  84. Re:C is dying because its slow by Anonymous Coward · · Score: 0

    for (;;) {
    malloc_tons_of_memory();
    do_lots_of_stuff();
    free_tons_of_memory();
    wait_a_while_for_more_stuff_to_do();
    maybe_quit();
    }

  85. some stats by buddyglass · · Score: 1

    Results within 25 miles of my residence at Indeed (full-time positions only):

    C: 1440
    C++: 474
    Python: 762
    Ruby: 336
    Java: 1113

    I suspect the results for "C" are inflated due to the difficulty of isolating only positions looking for the "C" programming language. Same exercise at Stack Overflow jobs:

    C: 2
    C++: 2
    Python: 10
    Ruby: 7
    Java: 14

  86. C is not dying and I wish it would. by Larsen+E+Whipsnade · · Score: 1

    C is responsible for the vast majority of stray pointer and buffer overrun vulnerabilities. Together with SQL injection and macros, it's making computing unsafe. C++ ameliorates the problem but does not eliminate it.

    C/C++ are low-level languages used to implement everything else. There is no direct replacement. We desperately need one. What's the holdup, folks?

    I had a look at Rust and could only ask: why isn't this twenty years further along by now? Oh, and... what's with that huge embedded runtime?

    1. Re:C is not dying and I wish it would. by gweihir · · Score: 1

      C is responsible for the vast majority of stray pointer and buffer overrun vulnerabilities. Together with SQL injection and macros, it's making computing unsafe. C++ ameliorates the problem but does not eliminate it.

      That is unmitigated bullshit. The language is not the reason for these problems, the coders are. Only a completely clueless person would blame a hammer for its ability to break things.

      C/C++ are low-level languages used to implement everything else. There is no direct replacement. We desperately need one. What's the holdup, folks?

      There is no "holdup". It cannot be done any other way. Either you have the power of C and then you also have the destructive power, or you don't, and then you cannot do the things C can do.

      I had a look at Rust and could only ask: why isn't this twenty years further along by now? Oh, and... what's with that huge embedded runtime?

      Simple: Rust is far less useful than its proponents claim. When you actually need its full power, you have to go to an "unsafe" model, and then it is about a save as C. Hence rather invest in learning C well, than going to a tool where you usually have a safety-net, but when you need to do without you do not have the experience to do so. The whole model is flawed fundamentally. It is not the tool, it is who wields it.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    2. Re:C is not dying and I wish it would. by Actually,+I+do+RTFA · · Score: 1

      Having the compiler check my work 90% of the time would still be nice. But, more importantly, if I know I don't have to check my jr. programmer's work for stray pointers outside an unsafe block, I can spend more time focusing on more useful input. And I can work with them on what the unsafe block should do and how to deal with things in it safely.

      I like it when the compiler makes it easy to catch my errors. That's why, for example, I like matching curly braces (detect an error) over the intelligent whitespace in Python. And static typing over dynamic typing.

      --
      Your ad here. Ask me how!
  87. If you want performance by Anonymous Coward · · Score: 0

    It's C or assembler. And as someone who's used both, C is vastly easier than asm.

    And everyone wants performance, but sometimes you have powerful enough hardware that you can get away with a stopgap like Java or Python for a few years. Then user numbers increase, hardware speed doesn't double when expected and someone decides it's worth trying to replace that festering pile of shit with something less problematic. And just about anything becomes problematic with enough load. Strangely, generally the more fashionable and easy to use the language was to use in the first place, the tougher it is to wring performance out.
    I mean C gets bagged often enough for it's flaws, but I don't often see Python or Java with 10k threads running for months on a BIG system without problems.

    It's slower to code C than say Java or Python which is why the trendy languages burst into the spotlight at intervals, but the heavy haulage is generally done in C. Surprisingly, not in C++, because if you want performance, again, C++ is faster to create code, but a lot harder to optimize.

    And if performance is king, why not asm ?. Because asm is *very* hard and very slow to code, you profile several times and try rewriting the algorithm a few times in C before you go there.

    1. Re:If you want performance by Half-pint+HAL · · Score: 1

      How important is performance on telling a light-bulb to switch on and off though? Timers for thermostats don't need even to-the-second response times, never mind microsecond accuracy. Traditional embedded devices need tight monitoring cycles, but "things" are generally pretty dumb devices all told.

      --
      Got them moderator blues I blieve I walk out the do', With these mod-points I been gettin', I 'most never post no mo'
  88. Re:We're all programming in Machine Code by Anonymous Coward · · Score: 0

    Get over it. No one gets confused by operator overloading (or function overloading) these days any more.

  89. "popularity" is irrelevant by gweihir · · Score: 1

    There are quite a few things that cannot be reasonably done in any other language. Also, because it is closest to the machine without being assembler, any real IT expert will have C-skills. It makes a world of difference.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  90. Re: We're all programming in Machine Code by Anonymous Coward · · Score: 0

    Why would I ignore them? What's the point in writing inefficient code?

  91. Re:Is your mum declining in popularity? by yuvcifjt · · Score: 1

    @Mods: Whichever idiot(s) modded the parent as "interesting" needs to be banned / moderator-rights taken away - they clearly don't have a rational mind, especially considering the subject of the post!

  92. Delphi #11's written in Object Pascal by Anonymous Coward · · Score: 0

    See subject: Outran rival languages like C++ in 4/6 tests given in a competing language's trade rag test (VBPJ oct 1997 titled "Inside the VB5 compiler"):

    STRING SUITE:

    Delphi = .275ms
    MSVC++ = .500ms
    MSVB = 4.091ms

    MATH SUITE:

    Delphi = 1.523ms
    MSVC++ = 2.890ms
    MSVB = 7.071ms

    API GRAPHICS METHODS SUITE:

    Delphi = .269ms
    MSVC++ = .293ms
    MSVB = 292

    TEXTBOX FORM LOADING SUITE:

    MSVC++ = .012ms
    Delphi = .069ms
    MSVB = .072ms

    ACTIVE X FORM LOADS:

    MSVB = .114ms
    Delphi = .495ms
    MSVC++ = .778ms

    NATIVE TO LANGUAGE GRAPHICS METHODS SUITE:

    MSVC++ = .293ms
    MSVB = .455ms
    Delphi = .503ms

    * Does "multiplatform" w/ the best of them (soon to have Linux64 too, not just Win32/64, MacOS X, Android etc.) https://community.embarcadero.com/article/news/16418-product-roadmap-august-2016/

    APK

    P.S.=> I created APK Hosts File Engine 9.0++ SR-5 32/64-bit https://www.google.com/search?hl=en&source=hp&biw=&bih=&q=%22APK+Hosts+File+Engine%22+and+%22start64%22&btnG=Google+Search&gbv=1/ using it... apk

  93. Certain languages attract assholes by EmperorOfCanada · · Score: 1

    C is by far not the worst of them but there are languages that just seem to be asshole magnets. Pretty much no matter what your coding/commenting style is, any mostly C programmer will not only try to tell you that you are wrong but will try to get you fired along the way. This is the sort of thing that really puts off new programmers.

    Just to make C people feel a little better, they are saints compared to anyone who claims to be a CSS programmer (are they seriously claiming to be programmers) or the worst of the worst of the worst, PHP framework evangelists. That portion of the PHP language world attracts assholes like black holes attract light.

    So while many of the comments here mention the technical virtues of this or that language, I find that culture is something that can make or break a language. For instance C++ is just now getting over the hump that was the pile of assholes who wanted to template the shit out of everything. I am literally talking about people who thought was rational that ints be turned into objects and never use the "primitive" datatypes. That whole generation of assholes must have been hunted down and boiled in acid as they seemed to have largely vanished from popular C++ culture. Hence C++ is now having a resurgence with their vanishing.

    1. Re:Certain languages attract assholes by Tranzistors · · Score: 1

      CSS programmer (are they seriously claiming to be programmers)

      If you believe that writing vanilla SQL is programming, then so is writing CSS. Both are just declarations of desired outcome and it is up to the interpreter to get there. Even functional programming is like that.

    2. Re:Certain languages attract assholes by EmperorOfCanada · · Score: 1

      I don't.

  94. Shooting off your cocksucker again troll? by Anonymous Coward · · Score: 0

    "I don't shoot my mouth off without knowing what I'm talking about" - by raymorris ( 2726007 ) on Thursday December 31, 2015 @09:29AM (#51215379)

    BS (I catch you shooting your mouth off fucking up constantly): 2 raymorris security fuckups https://it.slashdot.org/comments.pl?sid=5351503&cid=47379233/ & https://slashdot.org/comments.pl?sid=5351503&cid=47374033/ admitting you = script kiddie https://politics.slashdot.org/comments.pl?sid=8895203&cid=51726265/

    &

    Tell us how ONLY 'newer script kiddie tools' have stringlength built in (when PASCAL had it for ages - my fav tool) https://slashdot.org/comments.pl?sid=8472509&cid=51114383/ YOU BLUNDERING WANNABE!

    APK

    P.S.=> You like to talk behind others' backs like the gossiping bitch TROLL you are raymorris https://slashdot.org/comments.pl?sid=9880997&cid=53312265/ well, here I am letting YOU TALK in those links, showing your FAILS wannabe ... apk

  95. Re:We're all programming in Machine Code by Aighearach · · Score: 1

    A lot of people don't realize it, but even emacs is written in C. That's why it has such a great LISP interpreter!

    On microcontrollers it is fairly normal to write the C, and then hand-tune the ASM that gcc outputs.

  96. Re: programming tosh by Aighearach · · Score: 1

    No?

    Yes.

  97. Re:We're all programming in Machine Code by JoeMerchant · · Score: 1

    Power corrupts - especially in computer software. The most powerful languages and programs are the easiest for the users to become utterly lost and confused in. Nobody had a problem when the computer was a single switch between a power source and a light-bulb - On/Off, even your dog can figure that one out after a while. Take it up a notch with a second switch in another location and people start getting confused - especially if some joker puts the distant switch neither in up or down position, but in the middle...

    Just because C++ has the power to do amazingly complex things does not mean that doing amazingly complex things is always (or even often) a good idea.

  98. Re:We're all programming in Machine Code by JoeMerchant · · Score: 1

    Watch out for the nasal demons... they're perilously close to your optic nerves.

  99. Re:Submitter is clueless - 99.9% of web sites run by Aighearach · · Score: 1

    I write mobile apps in C you insensitive clod!

  100. Line between C and C++ blurred ... by perpenso · · Score: 1

    I'm well aware of this, but it doesn't change the fact that C++ is a different language with a fundamentally different philosophy. Adding features to a language is not some kind of neutral operation; it can affect users that have no intention of using those features.

    The point you are missing is that you don't have to use most of those features, and sometimes you should not. If someone want to write a project in "C" they will probably use a C++ compiler and use a minor feature of C++ or two. Their resulting code being far closer to C design and philosophy than C++'s. People have been doing so since the 90s. So the lines are quite blurred and the original question poorly thought out.

    1. Re:Line between C and C++ blurred ... by hey! · · Score: 1

      The point you are missing is that you have to maintain other peoples' code.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    2. Re:Line between C and C++ blurred ... by perpenso · · Score: 1

      Actually I've started projects and inherited projects that used the hybrid approach. The goal, back in the day, was to "enhance" C with a little bit of C++. The coding style and approach was still essentially C. The notion that using C++ requires a full blown OO approach and use of many advanced features is mistaken.

    3. Re:Line between C and C++ blurred ... by hey! · · Score: 1

      You need to understand operator overloading, even if you don't use it.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    4. Re:Line between C and C++ blurred ... by perpenso · · Score: 1

      You need to understand whatever bit of C++ you are using to "enhance" C. Plus operator overloading doesn't require that you shift from a C design and philosophy approach. I used operator overloading in a decimal math library, its fairly K&R looking code. The user defined decimal number type doing what one would expect with mathematical operators.

    5. Re:Line between C and C++ blurred ... by hey! · · Score: 1

      Well, any professional programmer should understand the concept of operator overloading; however my problem with the way you're framing the problem is that you're assuming an individual programmer has a choice about the features of the language he has to deal with. If you're a lone wolf, sure. But most of us have to maintain code other people create.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    6. Re:Line between C and C++ blurred ... by perpenso · · Score: 1

      As I said earlier I've inherited and ported many a project that used the hybrid approach I discussed. Over the decades C++ has often been used in a "lightweight" manner with a very "C like" approach.

  101. Re:We're all programming in Machine Code by Anonymous Coward · · Score: 0

    Why do people keep saying stupid things like this? You should be banned from future PL discussions for at least a year.

  102. Re:We're all programming in Machine Code by djrobxx · · Score: 1

    I beg to differ: it IS bad. Because when you read a+b, you have NO idea what may be happening

    I beg to differ with you!

    If you see the function add(a, b), you have NO idea what may be happening. And this applies to ALL the functions. In C++ a+b simply means operator+ IOW it's a function with a funny syntax just like any other.

    Not true. In C, if I see "a+b", I generally know that I'm getting the time-tested and well understood behavior of the compiler adding two numbers together. If I see "add(a,b)", I know that something more complex may be happening, and that if I need to know more, I should go look up the source or documentation for the add(x, y) function.

    I understand the potential readability benefit of operator overloading, but I've never liked the cost of making known compiler behavior ambiguous.

  103. Manpages by Anonymous Coward · · Score: 0

    Most C programmers will do "$ man fgets" instead of googling "C fgets reference"

  104. Re:We're all programming in Machine Code by Anonymous Coward · · Score: 0

    Operator overloading is great *if used appropriately*. For example, if you were implementing, say, a matrix class, or octonions, hyper-reals or any number of mathematical structures then overloading a+b makes perfect sense. But obviously if misused it just obfuscates.

    Just like using unions for type conversions, currying, pointer arithmetic, macro loops, or any number of obscurities in C. In certain limited circumstances they all have their uses, but they can all be abused.

  105. I C declining in popularity? by Anonymous Coward · · Score: 0

    Only with people who can't/don't program in C.

  106. Stop by Anonymous Coward · · Score: 0

    Terrible editorial on subject matter you clearly do not understand. Please stop harming an industry you are not a part of.

  107. Re:We're all programming in Machine Code by Anonymous Coward · · Score: 0

    Take apart any language and you will see a procedure part -computing values and the shell part that encloses the procedure. C is the procedure part in most languages in one form or other; CBASIC is the procedure part in Visual Basic. So, the skeleton and external shell with bells and whistles may appear to be different but the procedure part is almost identical (ignoring some syntactic peculiarity). Brain, heart, blood, nervous system and other internal procedural organs are almost identical in all mammals,but the external skeleton and covering is different. Even English has to use mathematical language within it to explain scientific concepts. Attachment to one particular flavor is human weakness and refusing to explore appropriate language for specific problem solving program is funny. I know to program in about 10 programming languages but I have to learn the different IDEs and some skeletal details. I have taught C++ without ever programming in it, so also in Visual Basic. If you look at programming there are three subproblems - defining a problem in a natural language without giving the domain knowledge - called assumptions; data structure and finally an algorithm expressed using the syntax of a given language. People getting upset about any language and refuse to leave their comfort zone have illusions.

  108. Online C code examples are dying... by nedgofast · · Score: 1

    I used to search for examples of C-code online with quite a bit of success. However, over the past two years I've found that the search engines just don't find the C code examples like they used to. Google search is no longer my "go-to" tool for trying to find code snippets. I search through other codes that I've worked on or written in the past. I supposed the development of good help features in IDEs has played a major role.

  109. Obligatory link to Stroustrup "interview" by Latent+Heat · · Score: 1
  110. So your stray pointer vulnerabilties... by Anonymous Coward · · Score: 0

    port over just fine.

    The trouble with C++ is it's not different from C in the ways it really, really needs to be different from C.

  111. Blame the coders! Great! by Larsen+E+Whipsnade · · Score: 1

    All we have to do then is fix the coders and all our problems will be solved!

    Wait. How do we fix the coders?

    It's a poor manager who blames his coders.

    1. Re:Blame the coders! Great! by gweihir · · Score: 1

      It is a poor manager who hires incompetent coders in the first place and it is a poor coder who is incompetent.

      You do not "fix" coders. You let those that can do it well do their thing and tell the other to stay the hell away from it. Poor coders have negative productivity and there are a lot of them around. That needs to stop.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  112. Design philosophy is different... by Larsen+E+Whipsnade · · Score: 1

    in ways that don't really address the deficiencies of C very well.

    Oh, and it's got lots of new bad ideas.

  113. Sometimes assholes have a point. by Larsen+E+Whipsnade · · Score: 1

    If you do it wrong in C - or assembly- it's really, disastrously wrong. And it's wrong in a way you don't realize until years too late.

    But really, that's a defect in C. And in humans, that we're not all capable of coding flawlessly. Which side of the problem is easier to fix? Oh... false dichotomy. Perverse human nature prevents us from addressing the issue with our tools!

    It's a poor workman who chooses bad tools. Or a PHB who chooses for him.

    C was a great innovation for its day, but it has lasted far longer than it had any business lasting. Likewise Perl. Likewise SQL. Language design is mostly churn and not enough progress. They're not working the problems. That denies us something good to move on to.

    Safe pointers, smart pointers, ditching the preprocessor - if I'd had oodles of free time I'd have done everything Rust attempts years ago. It seemed self evident to me that long ago, but the people who actually have the free time waste that free time inventing stuff like PHP.

    Or maybe PHP and the like are just easier to invent. It does seem that not all that much effort was put in.

  114. Re:We're all programming in Machine Code by Anonymous Coward · · Score: 0

    > C was conceived as a portable shorthand for assembly language.

    Uh, no, it wasn't. It was conceived as a more efficient version of BCPL, descended from the Algol family.

    There was absolutely no emphasis on portability at the start. Read: https://www.bell-labs.com/usr/dmr/www/chist.html

  115. It can't happen soon enough! by Tony+Isaac · · Score: 1

    And can we PLEASE finally say good-bye to COBOL???

  116. Re:Submitter is clueless - 99.9% of web sites run by Anonymous Coward · · Score: 0

    LOL! Are you the last remaining BlackBerry OS developer?

  117. Blame the managers! Great! by Larsen+E+Whipsnade · · Score: 1

    Now... how do we fix the managers?

    I have a feeling if we ever get rid of the stupid managers, the ones they're replaced with will have us avoid using C, and restrict to a subset of C++. Because an intelligent manager understands risk management.

  118. I know a COBOL programmer. by Larsen+E+Whipsnade · · Score: 1

    He derives no sense of meaning or purpose from his work. It rather depresses him. But hey, it's a living. And he'll never, ever get laid off and forced to train some guy from Bangalore.

  119. Easier? Don't you mean harder? by Larsen+E+Whipsnade · · Score: 1

    Operator overloading and templates obfuscate and much as that damn preprocessor.

    Maybe templates are worth it. They bring significant added value. But they do make code hard to follow sometimes.

    Multiple inheritance is a nightmare.

  120. Re: We're all programming in Machine Code by cyberthanasis12 · · Score: 1

    Maybe you should try modern features of fortran2008, it is clearer than C++. It may even help you write better C++ code. On a side note, how is auto much better than implicit declaration of variables of the 60s where you knew that a variable starting with j was integer?

  121. If things broke very fast, that would be fine. by Larsen+E+Whipsnade · · Score: 1

    The problems would get spotted and fixed very fast. But the real mischief is when they break so subtly you don't realize it until many years too late. This is what C is prone to, because of those horrid pointers. This is why C sucks.

    Unchecked pointers are bad, mmmkay? Don't make excuses for a bad tool. A good workman chooses a better tool. Unless he's prevented from doing so by apologists for bad tools.

    And the gaslighting only adds insult to injury. Seriously. Fuck that whole way of thinking. A bad manager chooses bad tools, and then blames the coders. Life is too short for that shit.

    The one virtue of assembly is that only the bare minimum is written in assembly nowadays. That minimizes the risk. I once had a boss wanted a whole suite of apps written in assembly because it would run faster. He would not listen to common sense. What an asshole. Went out of business after I quit. I don't miss him.

    Now his spiritual heirs are telling us to write the whole damn suite of apps in C/C++. And the apps are bigger these days.

  122. Or maybe they are competent? by Anonymous Coward · · Score: 0

    "Maybe C programmers are just referring to their K&R book instead of searching for solutions online?"
    Its been ten years since I looked in that book... and I can't remember ever using the Internet to find any information on C. Why? I know C, I work in it. If you have to look up what you are doing on the Internet every few hours you should probably be working with something else.

  123. Re: Is your mum declining in popularity? by Anonymous Coward · · Score: 0

    Why, it is perfectly cromulent opinion. C is older than many a millenial mom, and most of these were MILFs 15 years ago or more.

    And religion is, indeed, a cancer, unless it is my religion.

  124. Re:We're all programming in Machine Code by serviscope_minor · · Score: 1

    I know that something more complex may be happening, and that if I need to know more, I should go look up the source or documentation for the add(x, y) function.

    Well, in C++ you know something more complex is happening, so you need to look up the documentation of foo, add or operator+.

    I understand the potential readability benefit of operator overloading, but I've never liked the cost of making known compiler behavior ambiguous.

    The compiler behaviour isn't ambiguous, any more than it is for add().

    --
    SJW n. One who posts facts.
  125. Re:We're all programming in Machine Code by Anonymous Coward · · Score: 0

    "a + b" means in C: either integer addition, floating point addition, possibly with an implicit typecast on one of the operands.

    Ah, C is so simple even C programmers forget to list all the overloads of + : offset addition on a pointer, complex/imaginary addition just to add the ones I know. C just loves to bloat the language itself to add new types.

    it might even have side effects.

    An implementation of operator+ that has sideeffects is not normal and needs additional scrunity during code review, however it is also not out of question - after all float can set error flags since C99 - what sideeffects is the important question.

  126. Popularity? Who cares? by jandersen · · Score: 1

    I don't think the popularity is all that interesting; it is much more worthwhile to look at the usefulness of a language for the job at hand. For numerical programming, FORTRAN has always had a huge following, simply because it was and still is very good for that purpose. Same goes for COBOL and the handling of administrative datayou wouldn't write a compiler or a weather model in COBOL, but then you probably wouldn't want to write payroll application in FORTRAN, lisp, C or similar; you could, but it wouldn't make a lot of sense if you already have most of your codebase in COBOL. And so on.

    C is still one of the best, general-purpose languages there are: the syntax is simple, yet it allows the programmer to easily use nearly any facility available in the HW. Java has grown in importance because the applications that are needed now are different: optimisation for speed and/or size is no longer a major issue, but portability is; also, the Java environment has implemented a very comprehensive set of standards for things like database trnasactions (JPA), security (JAAS) and just about anything else you need in browser based enterprise applications, which means you don't have to speculate about how to do this or which libraries suit your purpose best. You just follow the standards, and that is hugely attractive. Some day we won't need to develop so many new things in that environment, and Java will become less popular.

  127. Re:We're all programming in Machine Code by Anonymous Coward · · Score: 0

    Of course when you invent a new language, you can't write a compiler in that language and compile it because the compiler doesn't exist (duh). What people do instead is to use an existing language to create a minimal compiler in the new language and use that to "bootstrap" more feature-rich compilers.

  128. Re: We're all programming in Machine Code by Anonymous Coward · · Score: 0

    On a side note, how is auto much better than implicit declaration of variables of the 60s where you knew that a variable starting with j was integer?

    1) It means you don't accidentally create a new variable by making a typo.
    2) You can define the scope of the new variable, which is a good thing in any language but especially important in C++ with RAII.

  129. C is overraterd by Anonymous Coward · · Score: 0

    Most C++ github projects header files are marked as C insted of C++.

  130. Re:We're all programming in Machine Code by Wootery · · Score: 1

    C is written in machine code

    Nope. Maybe the earliest C compilers were, but all modern C compilers are written in C/C++.

  131. C popularity by Anonymous Coward · · Score: 0

    I for one welcome our new PHP real-time microcontroller programming overlords.

  132. Re:We're all programming in Machine Code by Anonymous Coward · · Score: 0

    This is a ridiculous complaint. Every language lets you redefine certain symbolic constructs and derive your own domain-specific language to some extent. Might as well complain that lisp lets people write entire programs out of what look like logical groups of common words that mean whatever the programmer wanted them to mean. Then again, this is a common complaint around here.

  133. Re:We're all programming in Machine Code by Anonymous Coward · · Score: 0

    And I'm unable to apprehend how people think writing a C compiler in machine code means the C language itself is "written in machine code."

  134. Re:We're all programming in Machine Code by jeremyp · · Score: 1

    No it wasn't. C is a high level language and always was. You can argue that it was conceived to replace assembly, but that does not mean it is assembly in any sense.

    --
    All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
  135. Re: programming tosh by Zero__Kelvin · · Score: 0

    The C virtual machine is different because the is no C virtual machine.

    --
    Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
  136. Re: programming tosh by Anonymous Coward · · Score: 0

    In this sense, 'virtual machine' is the target platform and C does have one.

    For example, the 'register' keyword and pointer arithmetic make assumptions about the machine architecture that may or may not apply on a given hardware platform.

  137. Re:We're all programming in Machine Code by Wootery · · Score: 1

    A fair point. A bit like this programming language is slow, which might be broadly true in practice, but is really a property of existing implementations rather than the language.