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?
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?
... C is only for old people!
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.
Not again.
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.
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 !
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.
C is dying, Slashdot confirms it!
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.
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.
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.
"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 "
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.
Betteridge's law of headlines. Answer is no. HELL no. Hell no, you royal asshole. Discussion terminated. OK?
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.
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
TIOBE index ist not significant for the popularity (what ever that may be) of programming languages.
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++.
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."
C is a portable shorthand for assembly language.
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).
Just like real programming!
Sent as ripples into the electromagnetic field. No single photon has been harmed in the process.
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."
Better hurry before it's all gone,.
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
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.
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...
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.
...since D was released.
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'
C is not the next great thing. But is still the one of the best things and will always be a workhorse.
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.
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 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.
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.
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.
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.
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.
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.
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.
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.
I would imagine assemblers are written in C++ as well. Why not?
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.
That is what I seen. I can't remember the last time I saw a job ad for just C.
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...
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.
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.
That's to say: no, it isn't.
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.
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.
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.
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
Latest MenuetOS videos: https://www.youtube.com/channe...
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.
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 ?
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.
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
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.
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.
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
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?
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.
@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!
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.
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.
No?
Yes.
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.
Watch out for the nasal demons... they're perilously close to your optic nerves.
I write mobile apps in C you insensitive clod!
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.
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.
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.
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.
http://harmful.cat-v.org/softw...
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.
in ways that don't really address the deficiencies of C very well.
Oh, and it's got lots of new bad ideas.
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.
And can we PLEASE finally say good-bye to COBOL???
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.
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.
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.
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?
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.
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.
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.
C is written in machine code
Nope. Maybe the earliest C compilers were, but all modern C compilers are written in C/C++.
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
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'
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.