Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Objective-C Overtakes C++, But C Is Number One

timothy posted more than 2 years ago | from the you-c-you-c dept.

Programming 594

mikejuk writes "Although the TIOBE Index has its shortcomings, the finding that Objective-C has overtaken C++ is reiterated in the open source Transparent Language Popularity Index. The reason is, of course, that Objective-C is the language you have to use to create iOS applications — and as iPads and iPhones have risen in popularity, so has Objective-C. If you look at the raw charts then you can see that C++ has been in decline since about 2005 and Objective-C has shot up to overtake it with amazing growth. But the two charts are on different scales: if you plot both on the same chart, you can see that rather than rocketing up, Objective-C has just crawled its way past, and it is as much to do with the decline of C++. It simply hasn't reached the popularity of C++ in its heyday before 2005. However the real story is that C, a raw machine independent assembler-like language, with no pretense to be object oriented or sophisticated, has beaten all three of the object oriented heavy weights — Java, C++ and Objective C. Yes C is number one (and a close second in the transparent index)."

cancel ×

594 comments

Sorry! There are no comments related to the filter you selected.

I prefer Subjective-C (5, Funny)

Anonymous Coward | more than 2 years ago | (#40585857)

But that's just my opinion.

Re:I prefer Subjective-C (0)

Anonymous Coward | more than 2 years ago | (#40585897)

Heyooooo.

Agreed. (4, Funny)

MrEricSir (398214) | more than 2 years ago | (#40585925)

C's philosophy doesn't integrate well with Ayn Rand's.

Re:Agreed. (-1, Troll)

Anonymous Coward | more than 2 years ago | (#40585987)

God bless Ayn Rand. And God bless Ron Paul. If all of these "Progressive" Slashtards would stop complaining about these two, the world would be a better place. GOD BLESS RON PAUL!

OH I GOT MODDED DOWN??? (-1)

Anonymous Coward | more than 2 years ago | (#40586095)

I GOT MODDED DOWN?????

Proof that political correctness is overrunning Slashdot. This makes my blood pressure rise so much I have to take another pill! WHERE IS OUR FREEDOM? Taken by Barack Hussein, I believe.

Re:Agreed. (4, Funny)

Anonymous Coward | more than 2 years ago | (#40585995)

C's philosophy doesn't integrate well with Ayn Rand's.

Like hell it doesn't.

With C and Ayn Rand - you're on your own.

No pussy footing around with pee-pee holding concepts like "garbage collection", "array bounds checking", "welfare", "free health care".

Those are all for fucking wimps who need something to protect their incompetent asses.

Re:Agreed. (-1)

Anonymous Coward | more than 2 years ago | (#40586063)

God bless you and Ayn Rand and GOD BLESS RON PAUL! I have a feeling the lib-tards are crawling around and they are going to mod you and me down. THEY ARE SUPPRESSING OUR FREEDOMS! You can't praise Ron Paul these days without some lib-tard modding you down. All welfare recipients, immigrants and Democrats should be sent to jail! To protect our freedoms.

Re:Agreed. (0)

drkstr1 (2072368) | more than 2 years ago | (#40586347)

You need to work on your subtlety before trolling here. Go grind some levels on Reddit first, then come back and try again.

Re:Agreed. (1)

Anonymous Coward | more than 2 years ago | (#40586427)

Anything more subtle would be subject to Poe's Law.

There really are idiots out there, lots of them, that believe this stuff.

Re:Agreed. (-1)

Anonymous Coward | more than 2 years ago | (#40586569)

all illegal immigrants should be sent back to whence they came. america for americans.

Re:Agreed. (5, Insightful)

Genda (560240) | more than 2 years ago | (#40586237)

So strange... I find Ayn Rand completely guilty of the very same romantic notions that got the founders of Communism (she so despised) into so much hot water. Perhaps its true what they say about choosing your enemies well. Both presumed that the underlying greatness and magnificence of the human spirit either as a society or as a specific productive individual would prove the guiding light for humanity. In fact humanity has shown precious few guiding lights and for the most part, we are little descended from our primate ancestors. This isn't to say that we aren't capable of transcendence, simply that you can't depend on that to build a social or philosophical framework.

Design the system that demands human transcendence, inspires greatness, and puts strict limits to personal power and responsibly accounts for the grosser of human foibles and frailties, and you'll have a winner. We had that system in the form of checks and balances, until the "Randian" among us began to systematically dismantle those very defenses against our poorer natures, beginning in the 80s. Up until then, we had the time and means to look at the future we wanted as a society, not just a few social (read financial) elites, and strive towards that future wisely and with due consideration. Now we're in a kettle of fish. Those elite have proven to be every bit as ignorant, self obsessed/serving and foolish as everyone else and they've squandered the future on extra McMansions, expensive cars and yachts, and the virtual hijacking of our society.

C is a great language. You can't any closer to bare metal without slugging assembly around, and as we move to more and more intelligent particles infiltrating everything from household appliances to ubiquitous sensors in the roads we drive on, you better believe that C will bring consciousness to the dross matter that surrounds us. I can only hope, that we can put aside our prejudices (not only racial, but societal), and begin to replace belief systems with educated inquiry, and treat the future with our intelligence rather than our primate predilections. It is the only hope I can see for a future worth living in.

Re:Agreed. (5, Funny)

WrecklessSandwich (1000139) | more than 2 years ago | (#40586277)

I think you're looking for Objectivist C [fdiv.net] .

sorry (4, Funny)

Anonymous Coward | more than 2 years ago | (#40585867)

sorry but html and javascript is the future.. it must be true because all the kids just out of college say so.

Re:sorry (4, Insightful)

Johann Lau (1040920) | more than 2 years ago | (#40586069)

That'd be like saying letters are no longer required because we'll all be using words and sentences from now on.

Re:sorry (1)

Genda (560240) | more than 2 years ago | (#40586257)

Our educational institutions have become just one more kneeling acolyte, blowing the beast of many phalli, the corporation.

Re:sorry (2)

Gimbal (2474818) | more than 2 years ago | (#40586441)

To my understanding, HTML5 and JavaScript are the driving technologies behind frameworks such as PhoneGap and appMobi. Just sayin' - those languages are mobile platform compatible. (Objective C and Java, each, maybe not so much so)

fp (-1)

Anonymous Coward | more than 2 years ago | (#40585869)

fp!

Re:fp (1)

Anonymous Coward | more than 2 years ago | (#40585915)

As a (very) amateur programmer, ok, script kiddie. I can't pretend to truly understand this, but what I can say is that the idea of object oriented vs. non object oriented languages has always thrown me off.

Now, I understand that the idea is an object can have several different types of variables as attributes, and can be created dynamically, but I've never seen any text that can give any up front idea of (You can do this in OO/You cannot otherwise) that would sell me on programming that way. Yes, thats not what languages are about, different ones are best for different domains, and so forth, but really slashdot, what is the big draw to OO? The killer feature?

Pointers?

Sincerely,
AC
From the Made-it-to-chapter-16-of-all-of-these-at-some-point-but-no-further-dept.

Re:fp (3, Insightful)

Cinder6 (894572) | more than 2 years ago | (#40585997)

Here's a crazy brief explanation:

The big draw to OO is that it (ostensibly) makes it easier and/or faster to write applications. This doesn't mean that you can make programs with an OO language that you couldn't with an imperative or structured language, only that certain tasks may be easier to implement.

That said, OO isn't always the best option. OO languages are typically a lot more complex and produce slower executables than plain C, so there is a trade-off that can be important in certain situations. As with anything, pick the best tool for the job.

For myself, when I first learned programming (via some books), I learned C before moving to C++. I absolutely hated C++ and didn't see the point of OO programming, due in large part because of the way the book presented it. At the start, the author had you write a C program, and throughout the course of the book, you would change it into a C++ program full of OO goodness. The final C++ program wound up having 50% more lines of code for the exact same functionality, and that was the point where I gave up on it. It was a pretty bad first impression.

So maybe you're reading from the wrong book?

Re:fp (5, Insightful)

solidraven (1633185) | more than 2 years ago | (#40586037)

Objects simply allow for an efficient programming structure for large software. That's the main reason. The real debate is about how far this object orientation should go. There are people like me that are of the opinion: use objects when necessary for structure. Others on the other hand will wrap anything in layers of objects. Dynamic allocation isn't strictly necessary for object support (see C++ to know why). It's just that most object oriented languages now also want to use polymorphism, at that point dynamic allocation is necessary cause it's near impossible for the compiler to predict what'll happen. But it's a rather pointless debate in the long run. To each his own as they say.
It's like the static vs dynamic linking debate that you sometimes hear. There's no real valid answer to that one either, it's a best guess on what'll lead to the best performance. With dynamic linking you don't need to load all the libraries at the start, on the other hand with static linking you don't need to call up the linker each time a library is loaded, and so on... My main advice: stay out of it. There's no real valid answer to these sort of things.

Re:fp (1)

drinkypoo (153816) | more than 2 years ago | (#40586511)

I am not really a programmer and certainly not a software engineer so I have no input on what people SHOULD do, but as a person who reads and compiles and occasionally even successfully fixes code (occasionally but not usually fixing others' mistakes, mostly accounting for changes in libraries and such) I find it confusing when code is a combination of object-oriented and not. If I have to remember when I need to do something one way or the other I often seem to have a problem with that. It's valid criticism that there may be something wrong with my brain ;) but it seems to me like it makes more sense to pick a method and stick with it.

Re:fp (2)

oakgrove (845019) | more than 2 years ago | (#40586229)

Say you're coding a graphical interface and you want two buttons for okay and cancel. They both need to be blue. The toolkit yours using will have an object called Button that has the basic characteristics of what a button its, e.g., a clickable icon that does something. You sub class this Button and give it the specifics.

Button okay = new Button;

Button cancel = new Button;

You now have two objects of type Button. Next you get specific.

okay.onClick(proceed());

cancel.onClick(abort());

okay.color("00f");

cancel.color("00f");

This is terrible pseudocode butyou get the idea. instead of having to code buttons from scratch, you sub class them and only add what you need. typing on a tablet so I hope I haven't been unclear.

Re:fp (0)

drkstr1 (2072368) | more than 2 years ago | (#40586479)

See, now this is you troll! You even got a few takers. You should teach a thing or two to the Ron Paul troll [slashdot.org] above. Psshh, amateurs.

C Programming Language (4, Insightful)

Anonymous Coward | more than 2 years ago | (#40585879)

However the real story is that C, a raw machine independent assembler-like language, with no pretense to be object oriented or sophisticated, has beaten all three of the object oriented heavy weights

This sounds like it was written by someone who doesn't understand C. You can write object orientated code in C. You don't always need the language to hold your hand. And C is NOT assembler-like language. Not even close.

And as far as sophisticated code, I guess the author doesn't consider operating systems or most system programming to be sophisticated.

I guess you don't understand languages either (1)

Anonymous Coward | more than 2 years ago | (#40585935)

You can write reusable functional code in any language .... but you CAN'T write object oriented with it.

Re:I guess you don't understand languages either (5, Informative)

Anonymous Coward | more than 2 years ago | (#40585965)

typedef struct {
        int (*open)(void *self, char *fspec);
        int (*close)(void *self);
        int (*read)(void *self, void *buff, size_t max_sz, size_t *p_act_sz);
        int (*write)(void *self, void *buff, size_t max_sz, size_t *p_act_sz); // And data goes here.
} tCommClass;

http://stackoverflow.com/questions/351733/can-you-write-object-oriented-code-in-c

Re:I guess you don't understand languages either (1)

Anonymous Coward | more than 2 years ago | (#40586061)

Void pointers scare the shit out of me and make me very, very happy at the same time. I wonder why that is.

Re:I guess you don't understand languages either (0)

Anonymous Coward | more than 2 years ago | (#40586241)

You can also use GObject.

Re:I guess you don't understand languages either (3, Informative)

Anonymous Coward | more than 2 years ago | (#40585969)

you are aware that the first C++ compilers simply generated C code from the C++ then compiled to that.

Oh, and I've seen several OO languages written in C as well, that some senior engineer who "didn't trust C++" came up with. The only thing you don't get with these is enforcement of visibility with private/public, which isn't strictly required for OO. But polymorphism and the lot, yup, all that was there.

Re:I guess you don't understand languages either (2)

Coryoth (254751) | more than 2 years ago | (#40586345)

Enforecement of public private can be done: simply have your base object struct have a void pointer field called private and declare and allocate a private data struct as static in the .c implementation of the class. Voila, private fields and methods as needed.

Re:I guess you don't understand languages either (3, Informative)

geezer nerd (1041858) | more than 2 years ago | (#40586399)

Of course you can write object-oriented code in C. It has been done many times.

An object-oriented language has lots of syntactic help for the purpose, but all languages compile to some type of runtime code structure. If you understand what code gives the object-oriented behavior you want, then you can write it in C.

And yes, the poster who said C was assembler-like likely has never seen an assembler language, I would guess. I do remember writing a C routine once which had an initialized array containing hex representations of machine code to do a particular highly specialized task, and then using some coding wizardry to get the locus of control into that array when needed. Ah, those were the days.

Re:I guess you don't understand languages either (4, Informative)

dfghjk (711126) | more than 2 years ago | (#40586421)

Considering that C++ was originally implemented as a preprocessor for C, there's an existence proof that says you are wrong.

Re:C Programming Language (4, Insightful)

Lendrick (314723) | more than 2 years ago | (#40585945)

Is this a touchy subject for you, AC?

The author didn't say anything about sophisticated code, they said that C isn't a particularly sophisticated language. And it's not. C doesn't have very many bells and whistles -- it's just a very good, general-purpose language. The fact that the language itself is unsophisticated is what makes it good for writing the kind of code people write in C.

Secondly, C is not an object oriented language. I can write object oriented code in assembly language if I want, but that doesn't make assembly language object oriented.

Re:C Programming Language (1)

EllisDees (268037) | more than 2 years ago | (#40585957)

> You can write object orientated code in C.

You technically could...but why would you? If you want to write object oriented C, there's C++. What's the benefit?

Re:C Programming Language (0)

Anonymous Coward | more than 2 years ago | (#40585991)

Raw fucking blazing speed and flexibility.

Re:C Programming Language (4, Interesting)

icebraining (1313345) | more than 2 years ago | (#40586265)

From: Linus Torvalds
Subject: Re: [RFC] Convert builin-mailinfo.c to use The Better String Library.
Newsgroups: gmane.comp.version-control.git
Date: 2007-09-06 17:50:28 GMT (2 years, 14 weeks, 16 hours and 36 minutes ago)

On Wed, 5 Sep 2007, Dmitry Kakurin wrote:
>
> When I first looked at Git source code two things struck me as odd:
> 1. Pure C as opposed to C++. No idea why. Please don't talk about portability,
> it's BS.

*YOU* are full of bullshit.

C++ is a horrible language. It's made more horrible by the fact that a lot of substandard programmers use it, to the point where it's much much easier to generate total and utter crap with it. Quite frankly, even if the choice of C were to do *nothing* but keep the C++ programmers out,  that in itself would be a huge reason to use C.

In other words: the choice of C is the only sane choice. I know Miles Bader jokingly said "to piss you off", but it's actually true. I've come to the conclusion that any programmer that would prefer the project to be in C++ over C is likely a programmer that I really *would* prefer to piss off, so that he doesn't come and screw up any project I'm involved with.

C++ leads to really really bad design choices. You invariably start using the "nice" library features of the language like STL and Boost and other total and utter crap, that may "help" you program, but causes:

- infinite amounts of pain when they don't work (and anybody who tells me that STL and especially Boost are stable and portable is just so full of BS that it's not even funny)

- inefficient abstracted programming models where two years down the road you notice that some abstraction wasn't very efficient, but now all your code depends on all the nice object models around it, and you cannot fix it without rewriting your app.

In other words, the only way to do good, efficient, and system-level and portable C++ ends up to limit yourself to all the things that are basically available in C. And limiting your project to C means that people don't screw that up, and also means that you get a lot of programmers that do actually understand low-level issues and don't screw things up with any
idiotic "object model" crap.

So I'm sorry, but for something like git, where efficiency was a primary objective, the "advantages" of C++ is just a huge mistake. The fact that we also piss off people who cannot see that is just a big additional advantage.

If you want a VCS that is written in C++, go play with Monotone. Really.
They use a "real database". They use "nice object-oriented libraries". They use "nice C++ abstractions". And quite frankly, as a result of all these design decisions that sound so appealing to some CS people, the end result is a horrible and unmaintainable mess.

But I'm sure you'd like it more than git.

            Linus
- - -
From: Linus Torvalds
Subject: Re: Compiling C++ kernel module + Makefile
Date: Mon, 19 Jan 2004 22:46:23 -0800 (PST)

On Tue, 20 Jan 2004, Robin Rosenberg wrote:
>
> This is the "We've always used COBOL^H^H^H^H" argument.

In fact, in Linux we did try C++ once already, back in 1992.

It sucks. Trust me - writing kernel code in C++ is a BLOODY STUPID IDEA.

The fact is, C++ compilers are not trustworthy. They were even worse in 1992, but some fundamental facts haven't changed:

- the whole C++ exception handling thing is fundamentally broken. It's _especially_ broken for kernels.
- any compiler or language that likes to hide things like memory allocations behind your back just isn't a good choice for a kernel.
- you can write object-oriented code (useful for filesystems etc) in C, _without_ the crap that is C++.

In general, I'd say that anybody who designs his kernel modules for C++ is either
(a) looking for problems
(b) a C++ bigot that can't see what he is writing is really just C anyway
(c) was given an assignment in CS class to do so.

Feel free to make up (d).

        Linus

Re:C Programming Language (4, Interesting)

Guy Harris (3803) | more than 2 years ago | (#40586579)

From: Linus Torvalds Subject: Re: [RFC] Convert builin-mailinfo.c to use The Better String Library. Newsgroups: gmane.comp.version-control.git Date: 2007-09-06 17:50:28 GMT (2 years, 14 weeks, 16 hours and 36 minutes ago) ... In other words, the only way to do good, efficient, and system-level and portable C++ ends up to limit yourself to all the things that are basically available in C. And limiting your project to C means that people don't screw that up, and also means that you get a lot of programmers that do actually understand low-level issues and don't screw things up with any idiotic "object model" crap.

And, for a view somewhat less harsh about C++, but still not a case of "C++ roolz, C droolz!", see The Old Man and the C [opensolaris.org] , the abstract of which says

"You can't teach an old dog new tricks" goes the old proverb. This is a story about a pack of old dogs (C programmers) and their odyssey of trying to learn new tricks (C++ programming).

C++ is a large, complex language which can easily be abused, but also includes many features to help programmers more quickly write higher quality code. The TeamWare group consciously decided which C++ features to use and, just as importantly, which features not to use. We also incrementally adopted those features we chose to use. This resulted in a successful C++ experience.

Re:C Programming Language (2)

geezer nerd (1041858) | more than 2 years ago | (#40586425)

Perhaps you cannot remember a time before C++ existed. Object-oriented ideas existed before C++ and some people wanted to use them in their code.

Re:C Programming Language (0)

khipu (2511498) | more than 2 years ago | (#40585993)

You can write object orientated code in C.

No, you can't. But with some effort, you can write object-oriented code.

Re:C Programming Language (1)

flimflammer (956759) | more than 2 years ago | (#40586393)

So you basically just agreed with what he said?

Re:C Programming Language (1)

geezer nerd (1041858) | more than 2 years ago | (#40586465)

In American English, one says and writes "oriented". In British English, the word "orientated" is used for the same purpose. Something I had to learn when I left the USA.

Re:C Programming Language (3, Funny)

Kittenman (971447) | more than 2 years ago | (#40586501)

In American English, one says and writes "oriented". In British English, the word "orientated" is used for the same purpose. Something I had to learn when I left the USA.

So the British book was "Murder on the Orientat Express"?

Re:C Programming Language (5, Interesting)

bbn (172659) | more than 2 years ago | (#40586121)

You will often see comments to the effect that C is like assembler or that you can do anything in C it just lacks some syntactic sugar. But that is very wrong. Yes, you can to some degree emulate object oriented programming in C. But how would you go about changing your memory allocation (malloc) to use a copying garbage collector? Or do lazy evaluation Haskell style? How do you implement zero-cost exception handling? (longjmp is NOT zero-cost because it requires setjmp).

These concepts are easy for a compiler that compiles directly to assembly language. Often less mature compilers will compile to C as an intermediate language, but in that case the compiler will not be able to generate the most efficient code. For example, a compiler that uses C as intermediate step can implement exceptions using setjmp/longjmp but this adds extra code at every function call. A compiler that goes directly to assembler can implement exception unrolling using static knowledge about the stack instead for a so called zero-cost exception handling solution.

Similarly, a compiler using C as intermediate will be forced to use a conservative garbage collector such as the Boehm GC. Using more efficient solutions such as a copying garbage collector is simply not possible without knowledge of the stack layout.

Re:C Programming Language (1)

geezer nerd (1041858) | more than 2 years ago | (#40586495)

Compilers compile to "object code" or "machine code", not "assembler language". It may be that some simple compilers produce output in assembler language that has to be separately "assembled". And the object code generated by some compilers may have to be interpreted by another program, such as the Java virtual machine.

Re:C Programming Language (0)

Anonymous Coward | more than 2 years ago | (#40586301)

Writing well organized code doesn't make the language object oriented. Agree with you regarding the "assembler like" stuff the author wrote though - guess he doesn't know what he's talking about at all here (Just writing one simple program on an ugly arch, x86 should do very well here, should teach him the difference though :D)

Re:C Programming Language (1)

Hentes (2461350) | more than 2 years ago | (#40586375)

You can write object orientated code in C.

Writing OOP code and reimplementing an OOP language are two different things.

Re:C Programming Language (3, Insightful)

eruza (2679307) | more than 2 years ago | (#40586545)

You can write object orientated code in C.

The OP never said you couldn't, they said: "no pretense to be object oriented" (Emphasis mine.)

And as far as sophisticated code, I guess the author doesn't consider operating systems or most system programming to be sophisticated.

Again that's not what the OP said, they said C has: "no pretense to be ... sophisticated" They're saying C itself is not sophisticated, that has nothing to do with the code written in C. Sand is not a sophisticated medium, but I've seen sand sculptures that are definitely sophisticated.

However, you are 100% correct in challenging the "assembler-like" comment.

Re:C Programming Language (4, Insightful)

Genda (560240) | more than 2 years ago | (#40586555)

Code is a way of expressing human thought (language) in a way that binary machines can interpret and perform. There has been a forever search for a language that best captures the grace and power of abstract human thinking elegantly.

One of those searches lead to Object Oriented Programming. An OO language breaks the organization of THINGS in a very natural way for western thinkers. The thought here is that by creating logical constructs representing an OBJECT which has both its own unique qualities and abilities, while at the same time inheriting qualities and capabilities from the family of OBJECT from whence it was derived, that you can perform wonderful things with a minimum of code and that if you were careful in designing your application that it should be easily adaptable and extensible to the vagaries of life. Of course this power doesn't come free, and there is operational code to support its behavior, so tiny problems or very small code may well demand C, while a large application is best implemented in a framework that gives you the logical freedom of an OO environment.

I see you nodding, is that you understanding or falling asleep... sorry if the monologue uses big words, they're part of the concepts. Anyway, languages have intrinsic power depending on their features and capabilities. Arguably, LISP is the most powerful language one can program in today. It is also one of the more syntactically challenging, and demands a fairly healthy understanding of what a machine is fundamentally capable of doing to use to its full potential. There is a spectacular free course available at MIT online, go here [oreillynet.com] to read more about it, and decide if its something you might be interested in. While you're at it, you might want to read up in functional languages (for the more action oriented among us) or just spend a while over at Wikipedia learning about computer languages and how we got here. Definitely read a book on algorithms. Understanding how we take every day problems and reduce them to logical constructs, and how very smart people have optimized the process of managing those problems is a very cool exercise... and it'll grow your brain a notch or two (help you look at problems newly.) Master abstraction and reduction, and you've got a bright future wherever you go.

Java and C duking it out (5, Interesting)

SplashMyBandit (1543257) | more than 2 years ago | (#40585959)

Java's apparent decline seems to be because of the financial slump. Where the number of new enterprise projects using Java has reduced. Most of this work was deferred and is starting to pick up again (at least as far as I can see). Some of the apparent 'decline' in languages is due to the introduction of new languages. The absolute number of projects using any language may be increasing but with new languages being introduced the proportion for any one language becomes diluted.

That said, C deserves to be right up there because it is still completely relevant as a 'lingua franca' (common language) for talking to hardware or operating systems. It also has the same benefits of Java in that the language is small and the convention is to place complexity in the libraries rather than as arbitrarily added keywords. This is not very exciting for many Slashdotters but for regular joes it allows them to get things done while working on huge, long-term projects (where the set of staff that start the project aren't necessarily those that finish it) where being able to follow other people's code is critical. This doesn't make for good press or excitement in the blogosphere or conference circuit but these two stalwarts pretty much let you solve any problem in any computing environment (portability matters!).

Re:Java and C duking it out (3, Funny)

geminidomino (614729) | more than 2 years ago | (#40586047)

Java's apparent decline seems to be because of the financial slump. Where the number of new enterprise projects using Java has reduced. Most of this work was deferred and is starting to pick up again (at least as far as I can see)

I'm sure Oracle's mongolian horde of lawyers factors in there somewhere, too.

Re:Java and C duking it out (1)

ADRA (37398) | more than 2 years ago | (#40586413)

Maybe so, but outside of Slashdot, I've never heard someone decide to change away from Java because they were worried about Oracle in the least. I've seen companies open parallel .NET shops to work with customers in that ecosystem, but never just up and quit Java (and none that even considered it because of any perceived legal problems).

Re:Java and C duking it out (2)

geminidomino (614729) | more than 2 years ago | (#40586471)

Maybe they didn't change away from it, since that would involve trashing already invested time and money, but there's certainly a non-zero number of developers who went another direction at the start of a new project because of it.

Java is evil? (0)

Anonymous Coward | more than 2 years ago | (#40586401)

So Java is used by the financial institutions and we know that the whole finance industry is evil and crooked. That makes Java the tool of the evil crooks and therefore Java is evil and crooked by association.

After all, it's always taking memory that I've allocated by my hard work and saying that it's for my "convenience".

And Java is now an Oracle product, too.

Evil++

Objective-C not required to create iOS Apps (3, Informative)

Anonymous Coward | more than 2 years ago | (#40585967)

"Objective-C is the language you have to use to create iOS applications"

There are plenty of games and other iOS applications that are written in C and C++.

Yes, there is a little bit of "glue" code required for interaction with Apple APIs, but the implication here is that you can't use another language write the majority of an iOS Application, which is wrong.

Re:Objective-C not required to create iOS Apps (3, Insightful)

solidraven (1633185) | more than 2 years ago | (#40586217)

The real problem here is that they assume that search engine popularity translates into language popularity. It's not cause a bunch of hipsters want to learn how to make an iOS application that it's actually going to become the programming language of choice for a majority of the developers.
C in combination with some form of assembly still holds the absolute first position in terms of how much its actually deployed. Every mainstream OS its core, bootloader, ... was written in C and assembly. And lets not forget about all the microcontrollers out there. Almost all mainstream microcontrollers are programmed in C and assembly. And there are a whole lot more microcontrollers out there than CPUs. Lets take the 8051 as an example; If you knew how many USB controllers actually use an 8051 internally. I'd go as far as appointing the 8051 assembly a top 10 spot if the amount of deployed units of software is taken into account.
C++ holds its second spot without problem simply due to the fact that it's compatible with C and it does offer native object extensions.
The top 5 will probably be completed by Visual Basic, C# and Java for enterprise applications. They're perfectly fine languages for such goals and they do their job well.
After that it becomes tricky, most likely a couple of web languages like PHP and Perl in combination with a few of the old gems like Ada and FORTRAN. Ada is used in the aircraft industry on a regular basis and FORTRAN is the corner stone of weather prediction. Two rather interesting languages (not really programming languages though) would most likely also show up on there: VHDL and Verilog.
Anyway, I would just wish people would stop linking to the TIOBE index cause it actually has 0 value compared to real research into the subject. I'd rather see them do a study trying to correlate suicide statistics in the programming community with the programming language that was being used at the time, that might actually give more information about how good a language is than a couple of search engine hits.

Re:Objective-C not required to create iOS Apps (0)

Anonymous Coward | more than 2 years ago | (#40586369)

Could you pont to some of this 8051 USB microcontrollers?
.
I've been struggling with ARM, PIC and AVR. I'd wan't to give the old C51 a chance with a new samall project I've got.

PD: I love VHDL, but I think it should have remained as a hardware description language. Any sane person should go the system-verilog way.

see plus (0)

Anonymous Coward | more than 2 years ago | (#40585977)

What they don't tell you is C++ (NDK) is used in Most Android games or else it will be slow as hell. Google doesn't want to tell you that because they want you to use Java. Of course C,C++, Objective C > Java.

Re:see plus (0)

Anonymous Coward | more than 2 years ago | (#40586023)

What they don't tell you is C++ (NDK) is used in Most Android games or else it will be slow as hell. Google doesn't want to tell you that because they want you to use Java. Of course C,C++, Objective C > Java.

Java is only slow for programmers who don't understand what they're doing.

Seriously - it is.

Of course, if you understand what you're doing, you can program in just about any language and you'd never post anything as uselessly trite as "Objective C > Java".

Re:see plus (1)

0123456 (636235) | more than 2 years ago | (#40586059)

Java is only slow for programmers who don't understand what they're doing.

Or those who have to do anything complex and CPU-intensive.

Re:see plus (1, Informative)

SerpentMage (13390) | more than 2 years ago | (#40586129)

BS!

I have written fast programs in both Java and C# that are maybe 10% slower than pedal to the metal C or C++. It really does depend on how you write the code. There are things that make Java and C# very slow. In fact I think one can argue that the current incarnation of C++ is a dog in terms of performance. With all of that template "goodness" you are just loping on stuff that Java and C# can do in an easier manner.

BTW for reference I write financial algorithms that include Monte Carlo simulations.

Re:see plus (2)

0123456 (636235) | more than 2 years ago | (#40586143)

BS!

I have written fast programs in both Java and C# that are maybe 10% slower than pedal to the metal C or C++.

Good for you: for i = 1 to 100 is pretty fast in any language.

Now try doing complex signal processing in Java.

Re:see plus (0)

Anonymous Coward | more than 2 years ago | (#40586291)

BS!

I have written fast programs in both Java and C# that are maybe 10% slower than pedal to the metal C or C++.

Good for you: for i = 1 to 100 is pretty fast in any language.

Now try doing complex signal processing in Java.

Or anything with a GUI for that matter.

Re:see plus (1)

antsbull (2648931) | more than 2 years ago | (#40586367)

Weird how eBay threw out Microsoft technologies to use Java then isn't it? Could be, that you don't actually know what you're talking about and most likely that you don't work on enterprise scale projects.

What a loud of garbage (0)

Billly Gates (198444) | more than 2 years ago | (#40585981)

C is hardly in demand at all in the job market compared to other languages if you check monster.com and dice. I am not saying it is not important as operating systems tend to be written in it, but most demand is not to write operating systems or do very low level things.

Java was tops the last time I looked followed by C#.net, with php third but I would not be surprised if .NET overcame Java and php is becoming more and more popular.

Any other measure of importance is subjective and biased as every nerd has his opinion on why his tastes are better. But job openings and demand truly show what the market wants and is willing to pay which equals value/importance. Fact is I saw only one C programming position advertised in the last 7 years. .

Re:What a loud of garbage (0)

Anonymous Coward | more than 2 years ago | (#40586387)

Guess you're looking at other jobs than other people, at least in the embedded area noone would even think about using any of the languages you seem to prefer. Haven't seen more than a few job offers asking for any of those, and wouldn't like one either - but one should better not expect that personal view to be a good representation of the overall job market...

Bravo that C is still relevant. (4, Insightful)

PerlPunk (548551) | more than 2 years ago | (#40585985)

As much as I like languages like Perl and Java, where memory is managed for you (kind of), there will always be a great need for languages that brings programmers as close as necessary to the workings of the machine itself.

Re:Bravo that C is still relevant. (2)

gbjbaanb (229885) | more than 2 years ago | (#40586053)

yes, those 2 needs for performance are: cloud and mobile.

Both have energy issues, so efficient code means more battery life or less electricity bill. Nowadays, no-one cares about the old desktop area, so native code is coming back.

"machine independent assembler-like language"?!? (2)

Brannon (221550) | more than 2 years ago | (#40585989)

What? What idiot posted that garbage? Oh, timothy...

Understood.

There are several problems with that article (1)

93 Escort Wagon (326346) | more than 2 years ago | (#40586001)

1) The one stated in the summary - the C++ vs. Objective C graph is on a very small Y axis that exaggerates the differences.

2) They've included Javascript, apparently in it's seldom-used server-side form, to intimate its popularity is going down (AFAICT they don't bother to mention this differentiation).

3) In their 2011 vs 2012 table, they indicate a language's change in table rank using arrows - one point in change equals one arrow. Visually that makes it look like some languages (e.g. Visual Basic .NET) are exploding when in reality it's just that lesser-used languages need smaller increases in usage to make it look like they're taking off. VB .NET is in 15th place - the language in 10th place, Ruby, only has 1.77% penetration.

Shifting market or shifting paradigm (2)

tomhath (637240) | more than 2 years ago | (#40586003)

I have to wonder if the world is ready to move back to a simpler time. So much of programming these days involves building "infrastructure" with all the industry approved buzzwords (factories, patterns, aspects, reuse, blah, blah, blah); sometimes it's better to just bang out the application and move on.

Re:Shifting market or shifting paradigm (0)

Anonymous Coward | more than 2 years ago | (#40586207)

Which world? In the world of operating systems, they tried the same buzzwords and failed.

Ever tried looking for jobs using C? (5, Interesting)

Jiro (131519) | more than 2 years ago | (#40586029)

I don't get it. If you try searching for jobs programming in C, you'll find that almost everything that matches the search is Objective C, C++, or C# (or, on some poorly run job sites,a C++ or C# job where the punctuation got lost and it's displayed as C). Sometimes a job will say C/C++. C is rare as hen's teeth except for embedded development and there aren't *that* many jobs in embedded development.

I just went to monster.com and searched for C. What I found starting at the top was:

-- C++ job that lost the punctuation
-- Objective-C
-- C# job that lost the punctuation
-- C/C++
-- Objective-C
-- C/C++, C#
-- C/C++
-- Objective-C

etc. The first C job was item 14 (and is embedded). The next C job, ignoring the false hits on such things as A B C, was item 24 (also embedded), and C wasn't the main skill required. So how in the world can C be number one?

Re:Ever tried looking for jobs using C? (1)

geek (5680) | more than 2 years ago | (#40586161)

That's because most of the jobs using C are engineering jobs that work at the hardware level and it's assumed you know and use C at that level.

Re:Ever tried looking for jobs using C? (0)

Anonymous Coward | more than 2 years ago | (#40586295)

How does this answer parent's question. The first 13 job listing never mentioned C as a requirements. Are you assuming all those jobs are "engineering jobs that work at the hardware level and it's assumed you know and use C at that level" ? I don't see how iPhone app development using Objective-C assumes you know how to use C at the hardware level...whatever that means.

Re:Ever tried looking for jobs using C? (1)

labnet (457441) | more than 2 years ago | (#40586355)

That's because most of the jobs using C are engineering jobs that work at the hardware level and it's assumed you know and use C at that level.

Of the 7 electronic engineers here, all can code in C. There are probably a few other discicplines in science/engineering/graphics where C is a subset of your main capability.

Re:Ever tried looking for jobs using C? (5, Informative)

Animats (122034) | more than 2 years ago | (#40586171)

Mod parent up. "The popular search engines Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings." That's rather lame. Exactly how do they search for "C", anyway? Do Sesame Street episodes brought to you by the letter C count?

The decline in C++ is probably real. It's on the way out as an application-level programming language. Big, complex applications with serious performance requirements and elaborate internal data structures, like 3D CAD, benefit from being written in C++. But there's no reason to write a routine desktop business app in it any more. Just moving windows and menus around and talking to the database can be done far more easily by other means.

Re:Ever tried looking for jobs using C? (0)

Anonymous Coward | more than 2 years ago | (#40586365)

Not trying to defend C, but maybe they are just looking for engineers who can do the job with whatever tools they choose, hence no "C jobs".

Re:Ever tried looking for jobs using C? (0)

Dogbertius (1333565) | more than 2 years ago | (#40586573)

Perhaps because it requires extreme competence and a grasp of programming languages as a whole, including operating systems, Boolean logic, and chip fab (to a limited degree) in order to be a capable programmer at the minimum?

For the record, it took me all of a single weekend to master C++, Java, and C# by the time I was 25 years of age.

Maybe it helps to learn things from the ground-up the first time rather than bitching about how difficult it is years later.

love me sumodat objective-c (-1)

Anonymous Coward | more than 2 years ago | (#40586035)

if u aint using objective-c then u a programming chump

C lives! (1)

jpostel (114922) | more than 2 years ago | (#40586051)

Wherefore art thou Dennis Ritchie?

We need a new language (1)

CockMonster (886033) | more than 2 years ago | (#40586055)

Power and syntax of C, safety of C++, useful compiler errors like Java. NO HEADER FILES!!!

Re:We need a new language (0)

Anonymous Coward | more than 2 years ago | (#40586159)

Try D

Re:We need a new language (0)

Anonymous Coward | more than 2 years ago | (#40586185)

Go?

D? (0)

Anonymous Coward | more than 2 years ago | (#40586189)

Shame D is moving so slowly.

C, Cex & Cun (0)

Anonymous Coward | more than 2 years ago | (#40586075)

Come to the C-side

C you Soon

C is number ONE... (0)

Anonymous Coward | more than 2 years ago | (#40586103)

C is number one...hundred, in Roman numerals, that is. Hence the popularity, it's the Benjamin Franklin of programming languages, and as we all know, it's all about the Benjamins!

Greeting from beyond (0)

Anonymous Coward | more than 2 years ago | (#40586163)


#include <stdio.h>

int main()
{
    printf( "suck my wind, bitches.\n" );
    return 0;
}

- from "The C Programming Language", 2012 edition

C is the most portable (1)

phantomfive (622387) | more than 2 years ago | (#40586235)

My guess is that C, besides being a good low-level language, is popular because it is the most portable.

C code runs on any platform, the first thing people do when they make a new platform is create a C compiler. If your library is written in C, then you can write bindings for it from practically any language. Then the Ruby guys can be just as happy as the Java guys.

Probably more importantly, recently, if you want to write an app for both iPhone and Android, you can just code the backend in C, and all you have to do is create a GUI on top for each platform. You can't even write standard Java on either platform.

And nothing of value was said (2)

johnlcallaway (165670) | more than 2 years ago | (#40586247)

All languages come with compromises, and it's still a matter of selecting the one that gets a particular task done in an optimal manner given all the parameters of getting the specific task done with whatever compromises are allowed, the skills available, using the program, and maintaining it going forward.

And that's not something to be settled by a popularity contest.

For what it does, C is the best (1)

phantomfive (622387) | more than 2 years ago | (#40586251)

If you are looking for an imperative language that is flexible and lets you treat memory as memory, then C is the best language out there.

If you're looking for a language that abstracts all those computer bits out, and makes your job as easy as possible, you might want Ruby, C#, Prolog, or something else. But C lets you get a good feel for what your code is actually doing on the computer.

OBJECTIVE C IS BEST C (0)

Anonymous Coward | more than 2 years ago | (#40586319)

deal with it.

Just started learning objective C on thursday and (1)

physburn (1095481) | more than 2 years ago | (#40586327)

retvalue = [object methodname]; // YUCK YUCK YUCK

Simplicity and clarity (1)

Anonymous Coward | more than 2 years ago | (#40586361)

K&R (also known as the bible) is only a couple of hundred pages long. C is a simple language. You can read C code and not have to worry about strange gotchas. C++, on the other hand, not so much ... you can never be sure someone hasn't overloaded something beyond recognition. The rules of other languages are also way complicated and make it hard to understand what's going on.

You can write more concise code with other languages but the plethora of rules means that you will have more trouble understanding that code. Anyway, you can totally write fully structured code in C and that takes away many of the supposed advantages of other languages.

The only major language that is clearly better than C, in the clarity and simplicity department, is Python. The code is easy to read and doesn't have a lot of complex rules that will cause confusion.

"Overtaken"? (0)

MacGyver2210 (1053110) | more than 2 years ago | (#40586405)

Who says it has overtaken anything? For who? Where I code, we all use good 'ol C++. No matter how many times we tried to adopt Obj-C it just failed. Unless we wanted to write an iPad/iPhone app. Is this actually posted by an Apple shill? That would make more sense to me.

I have never found a non-Apple task that works better in Obj-C than a C/C++ setup.

Survey is skewed by iOS developers (2)

kriston (7886) | more than 2 years ago | (#40586423)

This survey is skewed by iOS developers trowelling out tons of appstore apps of questionable utility.

Re:Survey is skewed by iOS developers (1)

Anonymous Coward | more than 2 years ago | (#40586453)

aka software that people actually use vs software NOBODY uses.

TIOBE is worse than useless (0)

Anonymous Coward | more than 2 years ago | (#40586557)

Monster.com shows Objective-C tying with FORTRAN for a very small number of jobs: 5, in the entire Denver job market.
Not something I am going to base any career decision on for now.

C, raw machine independent assembler-like language (1)

Anonymous Coward | more than 2 years ago | (#40586585)

Mikejuk obviously has no experience programming in assembler and/or C. Not all languages that are not "object oriented" are raw or assembler languages.

C is a simple, well defined language that allows almost any program to be written - look at its ubiquity and persistent popularity for writing a very wide range of programs. It is far removed from the hardware details that assembler languages deal with (CPU registers and instruction sets, in particular). Where it not so, C programs wouldn't enjoy the high degree of portability that they do.

It is hard to guess what Mikejuk imagines a "sophisticated" language to be. Perhaps one that wears tuxedos, drinks martinis with the upper crust at swish affairs and puts on posh manners and accents to impress the debutantes? Or is she just trying to say that C isn't complicated, in a sophisticated manner? In which case, it's a feature, not a fault.

C is an assembler-like language? (0)

Anonymous Coward | more than 2 years ago | (#40586591)

Since when?

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?