C Top Programming Language For 2016, Finds IEEE's Study (ieee.org) 315
IEEE Spectrum, a highly regarded magazine edited by the Institute of Electrical and Electronics Engineers, has released its annual programming languages list, sharing with the world how several languages fared against each other. To assess the languages the publication says it worked with a data journalist and looked into 10 online sources -- including social chatter, open-source code production, and job postings. The publication has rated C as the top programming language this year, followed by Java, Python, C++, and R. From their article:After two years in second place, C has finally edged out Java for the top spot. Staying in the top five, Python has swapped places with C++ to take the No. 3 position, and C# has fallen out of the top five to be replaced with R. R is following its momentum from previous years, as part of a positive trend in general for modern big-data languages that Diakopoulos analyses in more detail here. Google and Apple are also making their presence felt, with Google's Go just beating out Apple's Swift for inclusion in the Top Ten. Still, Swift's rise is impressive, as it's jumped five positions to 11th place since last year, when it first entered the rankings. Several other languages also debuted last year, a marked difference from this year, with no new languages entering the rankings.The publication has explained in detail the different metrics it uses to evaluate a language.
As a C programmer (Score:5, Informative)
I find the results shocking. As most people I deal with struggle to write moderately complex C programs.
Also the use of the word "best" is highly subjective.
Re: (Score:2)
Re:As a C programmer (Score:5, Insightful)
No, as a pretty experienced C programmer too, it's *really* hard to find people who are even vaguely competent C programmers. You only need to set most people a completely trivial problem with vague exposure to pointers/memory management and they'll trip themselves up. "Implement memmov" usually is enough to catch out 95% of people.
Re: As a C programmer (Score:5, Insightful)
Yep. What this article tells me is that
good programmers have always known
that c (and maybe c++) is where
real work gets accomplished,
and those that got addicted to
interpreted crap are starting to
realize they were wasting their
time on hard to solve problems
that they 'discovered' were
actually difficult to solve with
an interpreted language.
Then again, I may be completely
full of crap as I have only
have 40+ years of experience.
Re: As a C programmer (Score:5, Funny)
And clearly still use a 40 character wide terminal for everything.
Re: As a C programmer (Score:4, Interesting)
ere real programmers get jobs done. Hell, I'd write this post in COBOL but Slash
dot would block it saying that I'm yelling.
Re: As a C programmer (Score:4, Insightful)
In all seriousness, arguments along the lines of "very few people are competent C programmers" in my experience can be generalized to "very few people are competent <insert any programming language here> programmers". Yes, C is a more challenging language because it requires very strict discipline to do well, but 8+ years in the industry has shown me that good coders are the exception.
Re: As a C programmer (Score:5, Insightful)
I'd say that "good programmers" can and do learn a variety of languages, and will use the most appropriate one for the task at hand. There's nothing wrong with getting down to the metal when requirements call for it, but doing so is foolish for many types of projects where top performance isn't a requirement. I'm a game developer, so I live and breathe C++ of course. But I write my tools in C#, and our game's scripting language is in Lua.
Why C# for tools? Because it has reflection, and a fantastic library for all sorts of serialization, networking, and UI support.
Why Lua for game scripts? Because then we can recompile and reload our game scripts on the fly, without even stopping the game.
Which programming language is "best"? It's a stupid question to start with, because the only reasonable answer is "it depends on what you're looking for in a language".
Re: (Score:3)
Let it slide... let it slide... No, can't
and a free reign
Exercise of sovereign power applies to nations, not offices, nor basements. If you mean that no restrictions apply, then it's "free rein".
Re: (Score:3)
Sounds like you don't have the appropriate libraries available. I worked for years in an environment with C and it was extremely productive. Never felt like I was "resolving the same problems" because the first time I solved it, I spent some time thinking about how to make the solution reusable.
Re: (Score:2)
And the reason for that is that too many so-called "programmers" are shit because they haven't cut their teeth on a real programming language. They need something that holds their hands at every step, isolates them as much as possible from the underlying hardware and OS, and really don't have a clue as to how computers work.
Reading a few O'Reilly books might cut it for web monkeys, but then again, anything you can learn from an O'Reilly book can also be learned just as well by someone in India or eastern E
Re: (Score:3)
"Implement memmov"? WTH would you do that? There's a reason that memmov() is a Library call.
It's rough to implement such subroutines accurately; even if you know what you are doing.
You don't need to be capable of doing low-level coding on a whim to be a competent C programmer.
Sounds like you're expecting the average C programmer to be a low-levell 3-Star or 4-Star pointers expert, and your standards may be unreasonably high, there.
Re: (Score:3)
You would need to implement memmove because, believe it or not, there are people out there who implement the libraries that memmove is implemented in. There are also people out there who implement libraries that need to know how to at *very* least do basic pointer operations, and how to work with raw memory.
As I said - it's very hard to find genuinely good C programmers - most ignore how very very simple functions are implemented.
For reference, a naïve (acceptable in an interview) implementation of me
Re: (Score:3)
I doubt you can write in 4 lines of C a memmov() function that works correctly, when source and target area are overlapping.
#include <stdlib.h>
void memmov(void *dst, const void *src, size_t count) {
memmove(dst, src, count);
}
How did I do?
Disclaimer - it's years since I did any serious C programming.
Re: (Score:2)
memmov is a function with this signature:
void memmov(void *dst, const void *src, size_t count);
Which copies count bytes from src to dst, and correctly deals with the case where src and dst overlap each other.
Re: (Score:2)
Re: (Score:2)
At which point someone should step forward and say that it's "memmove", not "memmov", at least in standard C. But extra credit if someone mentions "bcopy".
Re: (Score:2)
Re: (Score:2)
so, it's like memcpy?
Yes, like memcpy, except memmove (there should be an 'e' at the end for the C89 ANSI compliant name) allows memory to overlap. memcpy can be optimized to be faster since it doesn't have this constraint.
Re: (Score:2)
Yes, like memcpy, except memmove (there should be an 'e' at the end for the C89 ANSI compliant name) allows memory to overlap. memcpy can be optimized to be faster since it doesn't have this constraint.
And memmove() can call memcpy() if it determines there is no overlap, so there's not a lot of benefit to memcpy() for other than tiny copies that can be inlined.
Optimizing becomes more challenging when doing copies from unpinned threads on NUMA systems. You want to avoid reallocating a big block between CPUs, while at the same time avoiding big locks.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re:As a C programmer (Score:5, Informative)
Re: (Score:2)
There is no standard-required way to compare arbitrary pointers.
There is no standard-required integer type into which you can cast an arbitrary pointer. (intptr_t etc are technically optional).
It's architecture-specific whether comparing pointers as signed or unsigned is the correct thing to do.
There is no such thing as portable C because of crap like this, only "mostly portable C, eh, good enough".
Re: (Score:2)
If they're pointers to bytes then you can compare them directly. Alignment is the same forwards or backwards. If the regions overlap then sometimes you need a forward copy but sometimes a backwards copy! The direction depends upon where they overlap!
If you copy 0-100 over to locations 50-150, then you have to copy backwards, copy the 100 over first, then 99, etc. But if you're copying 50-150 over to 0-100, then you have to copy forwards, starting with 50 first.
That's the point in the interview where I su
Re:As a C programmer (Score:5, Informative)
Re:As a C programmer (Score:5, Informative)
The title of the post was "C Best Programming Language For 2016, Finds IEEE's Study", but it has been edited to "C Top Programming Language For 2016, Finds IEEE's Study"
such is life getting first post.
Re: (Score:2)
I did read the article. The part of my post about "best" was purely about the /. title and not the article, that comment was not even the main component of my first post. (I'm assuming you are capable of recognizing structure)
Are you trolling me or are you actually a twit?
Re:As a C programmer (Score:5, Insightful)
Re: (Score:3, Interesting)
People struggle with pretty much every language, it's just that the bugs are different in each.
Sure, but I would argue some languages are dominating strategies over others. There are bugs which simply don't exist in some languages but do in others. Like null pointers or references do not exist in OCaml (instead, you must use the optional type explicitly).
Re: (Score:2)
People struggle with pretty much every language, it's just that the bugs are different in each.
They're not "bugs" but features. Like languages, some are more popular than others. :-)
Re:As a C programmer (Score:5, Interesting)
You are certainly right about that. The nice thing about C is that the really incompetent will not get their code to run at all and weed themselves out that way. In contrast, a bad Java coder (for example) will usually get things to work, but very badly so.
Re: (Score:2)
I recall from my C class that the language only has 34 keywords and that one of its advantages is that it doesn't come with unnecessary baggage.
What that typically means in practice is that for anything beyond a certain scale, you need to write the unnecessary baggage yourself. And believe me, you will.
As an embedded engineer, I appreciate this and also have never had to use a string package, or library, in my professional career.
Some embedded devices do have complex UIs which might find it useful. I've never written the firmware for a modern digital TV or DVR might need to do some of that. But yes, most firmware (and I have worked on some) doesn't need to manipulate strings.
Re:As a C programmer (Score:5, Insightful)
Re:As a C programmer (Score:5, Insightful)
Re: (Score:3, Informative)
Also worth mentioning that not only does C run on the most different processors, C is the most portable between languages.....that is, if you write a library in C, it can be used in basically every other language.
There can actually be surprising gotchas regarding portability. Good examples:
That's defin
Re: (Score:2)
- dereferencing pointers to multi-byte values can cause errors on some processors when the pointer address isn't word-aligned, but will work just fine on others
When was the last time you saw someone do that?
Re: (Score:2)
Re: (Score:2)
The same logic works for many other languages
Which languages?
Re: (Score:2)
Re: (Score:2)
Have they rewritten the Java runtime in Java yet?
Yes. [wikipedia.org]
Last time I looked, it was written in C.
Not all of it. The original Sun class loader has been written in Java since 1.0.
Re: (Score:2)
I guess it depends on what you consider to be portable. Is it write one and run anywhere, or does it count if you can modify the program to suit the environment you are porting to?
Re: (Score:3)
C in terms of its primitives are portable. However if you are making a Phone App, you are not going to have a lot of luck with making a cross compiled app with a UI that will work well with iOS and Android. Because a lot of the code requires calling libraries and OS particular functions. Sure you can do it with bunch of #ifdef
but it is nearly like writing a program over again for each system. You would be better off with a good source control.
Re: As a C programmer (Score:3)
I see you do not understand what a mobile app is.
There is no real logic in the app, it's just UI for a web service. The UI is target-specific, in particular because it needs to respect platform-specific idioms and UX paradigms, and the UI is 100% of the app.
You're coming from the world of real applications which do real work and for which the UI is just a trivial interface driving a library. This is not what mobile is.
Re: (Score:2)
I see you do not understand what a mobile app is. There is no real logic in the app, it's just UI for a web service.
That's true in many cases, but it's far from the whole story. Well-written mobile apps try to minimise network communication because that can drain battery life much faster than a modest amount of computation.
Even badly-written mobile apps, like the Facebook client, do DSP on the device for things like its spyware voice recognition feature.
Re:As a C programmer (Score:5, Insightful)
C is still the most portable language in the universe. The only real language that works on all phones, in particuarl (ok, C++ does too but C is where you get all the amazing well written, optimized libraries you'd want on most devices).
It's not only the portability that matters, it's the software reuse. You write your nifty image recognition library in Java and that's pretty much the only language that can use it. Same for Python, C++, etc. Do a locate \.so | wc -l on your system - chances are that the libraries *not* written in C are a rounding error. Pick just about anything remotely useful - chances are it'd more more useful if written in C, because at the very least you can open the executable using dlopen/dlsym and invoke main() with the correct arguments.
If you stick to a C-only subset of C++ you can write your library in C++, but at that point why bother with C++ anyway?
Re: (Score:3)
If you stick to a C-only subset of C++ you can write your library in C++, but at that point why bother with C++ anyway?
Or you could write your library in C++ but put it behind a C interface. Then you can use all of the expressive power of C++ internally, and provide an API that can be called from any language. And it will still be very close to as portable as if it were written in plain C, because we now have decent C++ compilers on very nearly every platform.
Re: (Score:3)
Do a locate \.so | wc -l on your system - chances are that the libraries *not* written in C are a rounding error. Pick just about anything remotely useful - chances are it'd more more useful if written in C, because at the very least you can open the executable using dlopen/dlsym and invoke main() with the correct arguments.
Well, personally, I find the fortran written fast fourier tranform (fft) libraries rather useful... :)
To call from C, even
I'm sure there's way to create good C versions too, but the librarary sources might need a lot of macros, and leave a lot more to the mercy of compiler optimizations.
Re: (Score:3, Insightful)
And why would you need to do this?
misra?
Re: (Score:2)
C++ has some different rules about types, which some people think are better than the C rules.
Personally, I'd take the subset of C++ that still includes basic inheritable classes/structs, name spaces, etc. But avoid exceptions (hard to make this efficient a lot of times), avoid templates that are larger than a line or two (avoid the gawdawful code bloat it can lead to), etc. The "better C than C" version of C++ before the goal of every C++ standards committee became how new features they could cram in.
Re: (Score:2)
(ok, C++ does too but C is where you get all the amazing well written, optimized libraries you'd want on most devices).
You have clearly never had to support on very many third-party C libraries. The standard open source ones that have been around for decades (e.g. zlib, Berkeley DB) are indeed well-written and high-quality, but they are not the common case.
Re:As a C programmer (Score:5, Insightful)
First this is from the IEEE.
Many Software Developers are not affiliated with the IEEE as they may have followed the Computer Science discipline vs the Computer Engineering discipline.
So for the people IEEE would survey would be Engineers and companies with a Engineering discipline.
Now this Engineering discipline is about a make it once and make it right mentality. Meaning there is a preference towards more lower level coding, allowing detailed and measured controls over each line of code, at the expense of maintainability and programming time. C and Java is good for that type of coding.
However the Computer Science discipline is about making it maintainable, reusable, and fast deployment. This could cause less reliable programs with harder to calculate measures on performance. So languages such as Python and .NET have more appeal.
These different disciplines have cause many of flame war, as each other camp looks at the other guys code and says it is pure crap, because they focused so much on X and not on Y where Y is far more important and needed in real life.
The problem with C isn't that it is a hard language. It is a very simple language. But because it does things at a lower level there is often a lot of extra work (Memory Management and Pointers) that makes it difficult to get up to speed because it requires a lot more attention to detail on how each part works. While these other language you focus more on the problem being solved, even though your solution while solves the problem could be done so much better.
Re:As a C programmer (Score:5, Interesting)
Meaning there is a preference towards more lower level coding, allowing detailed and measured controls over each line of code, at the expense of maintainability and programming time.
I sorta agree with the rest, but this statement is dead wrong - if you want it reusable you write it in C. Anything written in Python/.Net/etc is only usable from a miniscule subset of languages, while the libzip.so on your system is reusable from everything. This is why the practical/engineering types write it in C - if they chose Python they'll have to rewrite it should they ever decide to use some other language. When they write it in C it need never be rewritten.
The problem with the software engineering/programming people is that they don't care about reusability, and it shows; once the project is done they move on to the next one. The people producing C libraries (like myself) are happily reusing the libraries we wrote two decades ago without having to rewrite them to use in another language. The people producing Python or C++ libraries abandon those libraries when they move to a new language - they don't have a choice.
Re:As a C programmer (Score:4, Informative)
software engineering/programming people is that they don't care about reusability, and it shows; once the project is done they move on to the next one. The people producing C libraries (like myself) are happily reusing the libraries we wrote two decades ago without having to rewrite them to use in another language.
That's quite a statement! And maybe true....
Re: (Score:3)
You are confusing the language and the OS feature. That libzip.so will need to be recompiled for every OS once compiled it isn't c code it is a compiled library. I could make a library in any other compiled language say FORTRAN.
If distribution your c code and the new system doesn't have the library then you get into dependacy hell.
Now C is considered portable because you can compile it on a different system. But that Python program I make I can run on Linux or Windows without any changes. Just as long
Re:As a C programmer (Score:4, Informative)
The problem with the software engineering/programming people is that they don't care about reusability, and it shows; once the project is done they move on to the next one.
That's a bullshit statement and you know it. The people who maintain projects like Spring, Hadoop, etc. don't give a shit about re-usability? Yeah, ok.
The people producing C libraries (like myself) are happily reusing the libraries we wrote two decades ago without having to rewrite them to use in another language.
And I still happily reuse Java libraries I wrote from over a decade ago without having to worry about what particular machine they're going to be run on, what OS changes have been made, etc. I haven't been doing much python programming lately, but I'm pretty sure I can run the same scripts I wrote 10 years ago and still have them work just fine today.
In addition, there is absolutely nothing special about C. C is a language, nothing more. The compiler can produce binary lib files that can be linked in to other code, but that isn't limited in any way to just C.
Use the appropriate tool for the job, and avoid treating everything like nail just because you only know how to use a hammer.
Re: (Score:3)
The people producing C libraries (like myself) are happily reusing the libraries we wrote two decades ago without having to rewrite them to use in another language.
And I still happily reuse Java libraries I wrote from over a decade ago
You missed the point - if your library is in C, it can be used from just about every language. Your java code is reusable only from Java, or will you now claim that those libraries from over a decade ago are useful to you when you move to another language?
Re: (Score:2, Troll)
I don't think they even teach actual programming skills in CS degrees any more.
As far as I can see Its now all web-based everything, and they what they are creating skilled is package/module integrators and project managers.
Re: (Score:2)
Well, C is "best" in the sense that it does not stand in your way. If you know what you are doing, that is very nice.
It does not help you much either, and for the semi-competent and incompetent masses of "programmers", that is a real problem.
Personally, I went back to C as main language a while ago after trying a number of alternatives. The only change is that I use Python as glue-code these days and withe the core-workers as C-implemented Python classes.
Looks like I have to have a go at R some time these d
Re: (Score:2)
Looks like I have to have a go at R some time these days though.
What about R is attracting you?
Re: (Score:2)
Personally, I am chuffed to finally be ahead of the curve! Time to grow my hipster Unix beard.
Re: (Score:2)
Who cares? Are you implying those controllers should be written in assembly? I'm not sure where your post is going.
C fucking rules. Interpreted drools!
Re: (Score:3, Informative)
No. Let me try to rephrase it.
The increase and/or popularity of C may be a result of embedded programmers working for manufacturing companies, who are mostly NOT in the USA or Europe. (At least manufacturing is not growing in here.)
Thus, if you live in the USA or Europe, you probably should NOT take these numbers (popularity) as a sign that C is a good employment opportunity. The growth is not where you live.
Being Slashdot content is written in English, I assumed mostly USA or UK readers. Perhaps I should h
Their criteria are weird (Score:2)
C is a small language, certainly compared to the others in the top of the list (Java and Python libraries are just huge). By using postings and general 'chat' about languages to gauge interest, i'm a little worried that people attempting to get their head around the larger language libraries will be taken as equivalent to what will most likely be more targeted chat about C. To me this would suggest that C is probably underscored, whilst larger languages will be overscored if using this sort of approach (not
5 month too early??? (Score:5, Funny)
No jobs for C (Score:5, Informative)
We measured the demand for different programming languages on the CareerBuilder job site....Because some of the languages we track could be ambiguous in plain text—such as D, Go, J, Processing, and R—we use strict matching of the form “X programming” for these languages.
So off to CareerBuilder and i typed in "C programming", with quotes. Result: electrical engineering positions, other non-developer positions and false-positives. Conclusion: C is used but seldom by developers.
Re: (Score:2)
I've mainly found only jobs for C. Because I look for Linux kernel and RTOS jobs.
Re: (Score:3)
I've mainly found only jobs for C. Because I look for Linux kernel and RTOS jobs.
This. I simply call bullshit on the upper-OP claim that nobody hires for C anymore. I mean shit, were I work, we hire for C (and C++ and Java, depending on the product.) People don't realize how much C is around us. Thermometers, thermostats, controllers. Anything with a PIC or AVR processor most likely runs something written in C.
Not to mention, as you said, jobs in kernel and RTOS development.
Re: (Score:2)
In other jobs I've done C programming, but only part of the time.
Embeded (Score:2, Insightful)
Embedded is getting popular right now, especially with IoT. Based on my experience, C is filling the role of Assembly for a lot of businesses. More importantly, this claim that C is the "top" language isn't very relevant to most developers because they won't be doing embedded work at the rate insinuated by this report.
Cant say i'm surprised (Score:4, Insightful)
Given the popularity of arduino and similar embedded devices that favor C I'm not really surprised at all to find C is still incredibly wide spread and popular
Re: (Score:2)
Re: (Score:2)
I've never used any c++ specific constructs in any of my arduino programs.
So you've chosen not to use C++ features, but your code is compiled as C++, and all of the framework code that calls your code is C++ -- and it definitely uses C++ features. C++ is the Arduino language, not C.
Object-oriented is a fad (Score:3)
Object-oriented is a fad!
So is IPv6!
Re:Object-oriented is a fad (Score:4, Insightful)
Object-oriented is a fad!
I wouldn't have believed you 10 years ago, but now OOP is out and uncool. The new hip people all program in functional style (and OOP is messing everything up [smashcompany.com]). I'm waiting for someone to discover the new imperative programming paradigm.
Re: (Score:2)
Which version of C would you use? (Score:2)
Re: (Score:2)
Re: (Score:2)
I'm about to start a project for fun using C and I was wondering what the best version would be C89? C99? C11? It seems that nothing in C99/C11 is all that compelling and I'd like to have solid multi-threaded support (POSIX threads). Any reason to use anything other than C89 features?
C99 has some really convenient features: ...) // comments
- inline functions (note: these work slightly differently than C++ because they fix the problem of guaranteeing symbol generation for linkage concerns)
- long long
- _Bool and
- (uint32_t, int8_t,
-
- not requiring all variables to be declared at the top of the scope
- local scoping for for-loop variables: for(size_t i=0; ival; i++)
- variadic macros
- snprintf
- designated initializers
- restrict (for the hardcore performance sensitive folks)
Microsoft draggi
Not a Surprise (Score:5, Funny)
As a perl developer... (Score:5, Funny)
does this mean I can raise my rates? : p
Why is the language such a big deal? (Score:2)
As someone who has written substantial code in enough languages that I’ve lost count, I am sortof (but not really) baffled by some people’s attitudes toward programming languages. Some are fiercely loyal to a particular language, willing to spent time bashing other languages, usually in ignorance of what people like about those other languages. Some people know only one language and live in fear for their lives that their one language will go out of style or they’ll have trouble finding
Re: (Score:2)
>C and assembly are all you need to know.
Neither will do for designing digital logic.
We use HDLs to create the logic that makes the instructions. Instructions are way too high in the stack.
Verilog sucks and System Verilog makes amends, but neither is worthy of VHDL.
VHDL's syntax sucks because it's based on ADA. But the execution model makes sense, unlike Verilog.
C will fail to help you make a chip. System C exists, but seriously, don't go there.
MyHDL is a python HDL which should be awesome, but it isn't.
Re: (Score:3)
I've used and modified C programs that took SPICE output to optimize IC circuit speed, and interfaced with part of Verilog to calculate gate loading and speed. C was essential to our process of chipmaking.
Re: (Score:2)
Never heard of SystemC?
Of course I have. I mentioned in the post.. "C will fail to help you make a chip. System C exists, but seriously, don't go there."
Re: (Score:2)
Until after all that work getting it done you realize it needs to move to a different processor and/or operating system.
Re: (Score:3)
C is actually quite portable. But documenting it correctly so that someone else (or you a few years later) can understand what's going on it a beast.
C is more portable than either assembler or C++ (to bracket it with similar languages). It's not the most portable, for that you need either an interpreted language or one that runs on a virtual machine. Like Java, Python, Smalltalk, Ruby, etc., but it's probably the most portable language that compiles to native code.
"syntactic sugar" except for OOP (Score:5, Interesting)
I would agree with you except for the fact that Java, C++, C#, Objective C and even Javascript all have Object Orientated Programming aspects to them which is much more than "syntactic sugar" (which is a great term).
Unfortunately for some, C saddles the user with the dreaded pointer. I'm not sure how pointers are taught today, but "back in the day" when I was taught pointers in university, the approach taken was pretty sadistic with the goal of instructors to demonstrate their intellectual superiority over their students by showing (and testing) the most bizarre and unlikely combinations of * and &. I suspect that this is reason for the fear of C and pointers (when all you really need to know about pointers is how to pass data to and from methods and how pointers can be used with strings).
Re: (Score:3, Interesting)
It doesn't matter HOW pointers are taught, they are inherently unsafe. Even reference counted pointers are unsafe, and I don't believe that those are currently a part of C. Pointers are a buffer overflow attack (or error) waiting to happen.
Re: (Score:2)
Even reference counted pointers are unsafe
In what way are ref-counted pointers unsafe?
Also isn't counting references basically what a garbage collector does anyway?
(I am aware that ref-counted pointers are not the same as garbage collection as implemented in Java, C#, and the like.
I'm also aware that garbage collectors don't necessarily literally count references when doing a sweep.
I'm just saying that the operations are similar in principle)
Re: (Score:2)
Pointers aren't inherently unsafe. They represent reality and offer speed. These two things will always have use, and safety is just doing the right damned thing with your code.
Re: (Score:2)
Re: (Score:2)
Re: (Score:3)
javascript is a good language since it runs in the most trusted sandbox, your browser.
Re: (Score:2)
Re: (Score:2)
Then, sure, use C. I'm not saying C is a bad language, only that there is a very good reason to use javascript, namely, if some shady person told you that they have an awesome app written in C, Flash, or javascript. I'd go with javascript, as I'm not about to build a VM to test a single app.
Re: (Score:2)
What if you need to talk to hardware (as system engineers typically do)?
There's espruino, javascript for microcontrollers, which supports peek()/poke()/usr() and similar.
But really, the overhead is enormous, so unless cycles and bytes don't matter, it's not the way to go.
Re: (Score:3)
C is just a glorified macro assembler. Real programmers use butterflies anyways.
Nice. 'course, there's an Emacs command to do that: C-x M-c M-butterfly [xkcd.com]
[I actually have that comic taped to my door.]
Re: (Score:2)
I have seen most code written in mostly C and compiled in a C++ compiler. (They often will use those nice C++ extras)