jeesh, I'm sure "glad" to see this is turning into another one of those "C is bad use C++" topics (you can replace "C" and "C++" with whatever languages/keywords/religions you prefer)...
Come on guys, the original post was about something else.
Quote:
Anyway, I wonder, why are there people who need C? Maybe it is because Linus Torvalds has something against C++? I looked that up in Google, and found this:
To answer the second question first: NO, it's not because of that. It will never be about what one person things, no matter who he/she is (and besides, Linus is a geek, not a god).
There are people who need C because they have to do "maintenance", there are still people who maintain accounting software written in cobol (met one of those 3 years ago, she was a nice 55 year old lady who never heard of OOP and I'm not kidding), there are also people who like to program something ELSE (like microcontrollers instead of games) and even if C is not "as good as C++" it's a lot easier to use C instead of (Z80 or whatever) assembly.
About Linus... well, his a jerk. To make things clear: Jerk = person with a HUGE ego. Wouldn't your ego be the same size if you were in his shoes? I've read the "Linus bashes C++" link, actually nothing in there surprises me. He's still a jerk, he is protecting (mainly) his 'precious' git and seems pissed off that someone made fun of his work by proposing a "better language, like C++" and he is right about some points (not 100%, but his ego doesn't let him learn that you can be both right and wrong at the same time :D)
Quote:
Why is C++ so hated in a lot of the open source world?
Excuse me, who said C++ is hated in the open source world? Just because older (call it "legacy") projects exist in C, doesn't mean they're the only ones. How about the squid proxy? What do you know, they migrated from C to C++ in version 3.0 (from reading their mailing list, looks like they did it because it was written mostly in object-oriented C anyway so C++ was the logical next step)...
IMHO, C++ is NOT hated in the open source world. Looks more like "C is hated in the gamedev.net world", but I don't get why is that... It's just A LANGUAGE. Like java/perl/python/php/your_own_favourite/your_own_grammar/assembly/whatever ! Nothing different.
And yeah, it has goto's. Big deal. The thread title says "torvalds and c++", not "please don't ever use goto".
So, to actually get to the part where I write an answer for the OP (I was meaning to get there):
Thread title: some people don't like apples and they try to avoid eating apples, other people love apples and eat them all the time. Torvalds just doesn't like C++ (maybe something happened between them when they were both young and foolish, I don't know), just leave it to that.
Quote:
I've got some code on the internet, which are C++ libraries, and sometimes it happens that I get an email from someone who asks if it's possible to have a C version.
I guess that someone either only knows only C and doesn't feel like learning C++ or he's constrained by the circumstances to code in C.
You just do as you want: you can rewrite your libs ('convert' sounds bad :D) in C, tell them you can provide a C wrapper to those libs or just say "sorry, C++ is my language of choice"...
They're your libs, do as YOU like.
[joke]
I'm tired of how many people tried to tell me carrots taste good when they're boiled, I can't stand how they taste and one of these days I'll write an ugly post about carrots hoping that people might think "hey, why aren't some people eating carrots? is it because cobru wrote this post: link" ... :D
[/joke]
Have fun!
Q: How many programmers does it take to write a nice piece of software?A: MORE.