Survey Says C Dominated New '08 Open-Source Projects 378
svonkie writes "C overwhelmingly proved to be the most popular programming language for thousands of new open-source projects in 2008, reports The Register (UK). According to license tracker Black Duck Software, which monitors 180,000 projects on nearly 4,000 sites, almost half — 47 per cent — of new projects last year used C. 17,000 new open-source projects were created in total. Next in popularity after C came Java, with 28 per cent.
In scripting, JavaScript came out on top with 20 per cent, followed by Perl with 18 per cent.
PHP attracted just 11 per cent, and Ruby six per cent. The numbers are a surprise, as open-source PHP has proved popular as a web-site development language, while Ruby's been a hot topic for many."
c-derived languages? (Score:5, Insightful)
Seeing as one of the projects mentioned with the most releases was in C#, is it lumping C,C++,C#, etc all under one label?
Re:c-derived languages? (Score:5, Insightful)
Which it shouldn't, as C, C# and C++ seem pretty distinct.
And what about Objective-C?
Not surprising (Score:4, Insightful)
The results really aren't surprising: as TFA states, most projects use more than one language. So C coming out on top with Java #2 is hardly unsurprising: many extensions built for scripting languages use either C or the primary language for the VM they target (Java for the JVM) in addition to whatever scripting language they are for. And JavaScript being tops among scripting languages also isn't surprising; PHP and Ruby may be popular for web applications, but most PHP and Ruby web apps (and web app frameworks) rely on the use of JavaScript on the client side, and so will often also include JavaScript.
Just because PHP is popular (Score:2, Insightful)
Does not mean it is suitable for large-scale development projects. People who have done projects in better languages understand this, and I fully expect to be flamed by people who need PHP to get anything done.
Re:c-derived languages? (Score:2, Insightful)
I'd expect that the C family won because of Objective-C; there was a huge amount of iPhone development this year.
Re:c-derived languages? (Score:5, Insightful)
C is very popular for cross platform programs especially open source that don't rely on much platform specific code (c# is windows specific and c++ has some issues if you are not very careful).
But yeah, c should not count for c++ and c#. Their syntax may be similiar but they are approached and programmed quite differently (their are other languages with similiar c syntax so but they are not lumped in).
Re:Just because PHP is popular (Score:4, Insightful)
PHP has been applied to many large scale development projects, demonstrating that you are incorrect. Don't misconstrue your own preference for one language over another to mean that a language is inferior or unsuitable.
Re:Just because PHP is popular (Score:5, Insightful)
Well, no.
"X has been used for Y" does not demonstrate that "X is suitable for Y".
C(++) is here to stay! (Score:4, Insightful)
Yes. It certainly has its flaws, but I don't think we could have made a better choice. If I had to pick another language to still be active in another 15 years, that would be it.
Re:Just because PHP is popular (Score:2, Insightful)
Re:Just because PHP is popular (Score:1, Insightful)
Facebook and Yahoo come to mind.
how stupid (Score:3, Insightful)
What the hell does "scripting" even mean? Perl and Ruby are the same class of language as C. Javascript is an entirely different beast. Whoever categorized Ruby and Javascript together must be completely ignorant of programming.
Open source != popularity (Score:3, Insightful)
One thing that PHB types need to be made aware of is that the level of use within open source projects does not necessarily imply usage in general. I would expect PHP to be used less to make open source projects. Rather, I would expect it to be used to build websites, which tend to be heavily customized things that don't need to be replicated across sites the same way that open source software tends to be.
Obviously there are exceptions for things like Squirrelmail or PHPBB, but they don't invalidate my argument.
Re:Black Duck Software? (Score:5, Insightful)
Anyway, here [blackducksoftware.com] is their actual press release
Thanks for that.
Let's compare "here" with the summary. "Here":
47% of these newly created projects used the C language. Java came in as the number two language of choice at nearly 28%. Third was Javascript at over 20%. In the world of scripting, nearly 18% of the projects chose to use Perl
Summary:
47 per cent â" of new projects last year used C. [...] Next in popularity after C came Java, with 28 per cent. In scripting, JavaScript came out on top with 20 per cent, followed by Perl with 18 per cent.
I note that 47+28+20+18 > 100, so somewhere there's a move from one "percentage pie" to the next. I would like to know which language is in which pie, and more importantly why, and why there aren't numbers for one big pie with everyone in it. I'd also like to know why the summary (which is taken from the register) and the "here" seem to be ambiguous, when read together, about which pie javascript goes into.
I don't think malice is a good explanation for all of this, so I'll assume incompetence. That goes well with the 98%-of-everything-is-crap law ;)
Re:C? Here's the problem (Score:3, Insightful)
In other words, most of them die before they are even borne.
Quite true, as it is with commercial projects. It's just that you never see those.
Re:c-derived languages? (Score:2, Insightful)
They also say that these projects "use" C, but don't say that C is the primary language being used. Most languages give programmers the option to implement parts of their program natively to either re-use existing code or optimize for performance. If a Java project contains a few native methods or a Python project has a native extension module, it would seem that those projects would count as both C and the primary language, despite the fact that the amount of C code is relatively small.
Re:Just because PHP is popular (Score:4, Insightful)
How can you build anything large-scale in a language too dynamic for proper static verification?
Sometimes large-scale projects in static languages can be small-scale in dynamic. For example look at the ridiculous amount of resources devoted to dependency injection frameworks in Java, where in Python or Ruby those capabilities are essentially built in.
Re:how stupid (Score:4, Insightful)
Yes because a compiled, statically-typed, procedural language (C) has everything in common with an interpreted, dynamically-typed, object-oriented language.
Re:how stupid (Score:3, Insightful)
Re:Just because PHP is popular (Score:5, Insightful)
'But at the same time, show me a large scale project done in PHP, and I'll show you a large scale project that would have been better off in Python.'
With all do respect, I find that most worshipers at the altar of python feel the same way about anything that doesn't require C for the sake of performance.
I realize you guys feel that code should LOOK pretty. But not everyone agrees that you need the language to mandate style and FUNCTIONALLY python is no more capable than Perl (example intentionally chosen to make pythonites cring). For most web projects, php is as capable as either.
Besides, he claimed PHP was unsuitable for large projects not merely that there were better choices. PHP is suitable and demonstrably so. There are languages that aren't, like VB. There are no large projects primarily written in VB for this reason despite the fact that vb was extremely popular.
Re:c-derived languages? (Score:5, Insightful)
Technically no, practically yes. C# is .net specific and .net is windows specific. Mono is not 100% compatible.
Re:c-derived languages? (Score:3, Insightful)
Isn't Objective-C about as widely used as Esperanto?
Re:how stupid (Score:2, Insightful)
Being "interpreted" is not a property of the language, merely of some implementation of the language.
Re:Just because PHP is popular (Score:2, Insightful)
Truth is, static verification is generally overrated. Static typing has its place, but its place is not "everywhere, all the time, in every app". This topic is hotly debated, but for me the proof is in getting the job done effectively and quickly.
If a program works, and does it without a lot of static typing and other mumbo jumbo, then so much the better.
Re:no C++ (Score:2, Insightful)
Re:c-derived languages? (Score:1, Insightful)
...don't rely on much platform specific code (c# is windows specific and c++ has some issues if you are not very careful)...
Hate to sound like a troll, but...
C# is compiled to the CLR (common language runtime in .NET parlance) which is just-in-time compiled at run-time to machine language. This is the same as any .NET language, such as VB.NET, etc.. The upshot of this is that the code will compile and run on any machine with the .NET runtime and a C# compiler available.
Case in point is MONO, bringing the .NET languages to multiple platforms including Linux, Mac and Windows (again). MONO includes a C# compiler, making C# a cross-platform language (up to version 2.0 and bits of 3.0 at least).
Re:c-derived languages? (Score:5, Insightful)
> Technically no, practically yes. C# is .net specific and .net is windows specific. Mono is not 100% compatible.
1. If (depending on version) Mono is not a perfect port of .NET, that makes .NET code using those bits, not cross-platform. That is not the same as windows specific. For instance, not every program written in Python will run on all platforms. Some of its' standard libraries are platform specific (Eg: msvcrt). But Python is considered cross-platform.
2. C# IS cross-platform. AFAIK the compiler implementations behave identically. It's small portions of the standard library that are at fault.
But nothing stops you from writing fully cross-platform code, if you must. Just a bit more effort.
Personally, I gave up on C#. While C# is indeed better designed than Java, Groovy integrates with Java well and fills up any of the major feature and productivity gaps that I cared for anyway.
Re:Just because PHP is popular (Score:5, Insightful)
Three of the world's top 10 websites are PHP-based. Wikipedia, and facebook, along with vast chunks of yahoo.
I'm gonna go ahead and argue that "X has been successfully used for Y by 3 of the top 10 organizations in the Y industry" is pretty solid evidence that "X is fairly suitable for Y". In fact, I think you'd be hard pressed to demonstrate that "X is unsuitable for Y", given the level of success these sites continue to achieve.
WP, Facebook, and Yahoo all have their business problems, but PHP is the least of them.
Re:c-derived languages? (Score:3, Insightful)
I will admit to the possibility that my information is outdated. I find it is generally best not to invest must time in MS solutions when there is a practical choice. Coding for .Net is certainly avoidable.
From those I knew who DID use C# and wanted to use mono as an alternative the word was that mono lacked fundamental components of the standard library that were basically showstoppers (forms if I remember correctly).
There is platform specific code for Perl, Python, etc but in practice it doesn't take much effort to write around it, in most cases there isn't even a significant advantage to using the platform specific code. There is no fundamental functionality in the interpreter that is missing on any particular platform.
Maybe my information is dated and there is just nitpicky stuff missing from mono these days. But I don't exactly see a bunch of non-windows .Net apps (or any for that matter) popping up so I doubt it.
can algebra ever die? (Score:3, Insightful)
For C to die is like saying algebraic notation is going to die. Suspect if it wasn't for the need to eat, we would all program C & figure out ways to get the same features of our day job languages in C.
Re:c-derived languages? (Score:5, Insightful)
You're getting funny mods, but you're more on target than you think. All the jailbreaking stuff for the iPhone is open-source, as are the package mangers you can install after jailbreaking, and most of the apps available through those package managers. It's a pretty big collection of stuff.
Re:c-derived languages? (Score:2, Insightful)
Non-portable code can be written in any language.
Re:c-derived languages? (Score:3, Insightful)
Isn't Objective-C about as widely used as Esperanto?
Last I checked, it was the primary development language of one of the most popular smartphones in the world. And MacOS X's market share isn't too shabby lately, either. So I'm not sure how many Esperanto speakers there are, but I suspect they're significantly outnumbered by Objective-C fluent folks. And, of course, people USING Objective-C-based software number in the tens of millions.
Re:how stupid (Score:2, Insightful)
What if I learned Scheme and Haskell?
Re:how stupid (Score:3, Insightful)
I think that the parent was referring to the fact that:
* C, Perl and Ruby are mostly used to write standalone utilities and apps
* Javascript is used to script the high-level functionality of a browser (albeit to produce more apps too, sometimes)
So it's not about compiled vs interpreted, or memory management models. It's about actual practical usage scenarios. And lumping Ruby and Javascript is indeed silly in that sense.
Re:c-derived languages? (Score:2, Insightful)
Well, yes. Primary development is targeting Windows.
But I have to ask you--for anything that you would do in Java or PHP or Perl or Python, two things:
One: is it even worth being cross-platform? When I'm doing cross-platform stuff, invariably I find that I'm drawn to one platform's libraries because they're just better at what I want to do. For games stuff, for example, DirectX is just leagues ahead of OpenGL and the assorted other libraries, both on OS X and Linux. Similarly, if I'm doing web development I'm using PHP and thus almost certainly targeting Apache, so if I need to use PHP's POSIX extensions, why the hell not? (Cross-platform coding for its own sake is rarely useful, I find; I do it when I'll realize a benefit.)
Two: on the flip side, if it is crossplatform--am I going to be using the stuff where compatibility matters? Between .NET and Mono, there's really very few things that I use that are incompatible with Mono. I don't use anything in the .NET 3.0 or 3.5 libraries except for LINQ, which Mono supports. System.Windows.Forms works fine. All the database stuff works fine, whether my Linux box is talking to a MS SQL database or a MySQL/PostgreSQL database. Even the 3D stuff in SDL.NET works fine on OS X, Linux, and Windows.
Mono is behind, and there are occasional problems. I'm not saying there aren't. But the pluses of the platform in general make it worth it for me.
Re:how stupid (Score:3, Insightful)
Why is explicit memory management required for a language to be a "programming" language? What practical difference does it make to have explicit memory management as opposed to implicit, but well-defined, automatic behaviour?
Re:Just because PHP is popular (Score:2, Insightful)
Re:c-derived languages? (Score:3, Insightful)
It's also the only one of the C family I can use for large projects without hating the language.
Re:c-derived languages? (Score:3, Insightful)
Lumping C# in with C is stupid. Lumping it in with Java makes a lot more sense. Or to put it in other words, C# is Java re-imagined (for better or worse, depending on your POV). (No, it isn't a direct copy. Too many important differences once you actually learn it.)
Re:Just because PHP is popular (Score:2, Insightful)
Of course you can write Facebook in ASM. It's just a lot of work (and you'll be bound to the platform you've chosen forever).
Re:Just because PHP is popular (Score:3, Insightful)
But Erlang and Perl?
Perl I'm not sure about, but erlang was created *specifically* to run the world's telephone networks, and you don't get much more large scale than that :-P