C vs c++ (again)

Oh, they are moving towards C.
That is awesome. +1

Why would that be awesome?
Are there somewhere some real world test showing real (and especially consistent) performance gains for using C instead of C++?
Or do I have to suppose the usual, tiresome “I’m an old C goon, simply I’m too lazy to learn C++?”

There will be no performance gains and code will be more verbose.


You know, this really drive people away.

Oh, and for anyone that likes C, there’s this very cool library:

They even got an EpicMegaGrants recently.

It’s really awesome.

C is much better than the shitstorm that C++ is, C++ is a huge clusterfuck. http://harmful.cat-v.org/software/c++/linus

Good luck writing server software in C.
I wonder how many crashes, leaks and security holes it would have comparing to modern C++, not mentioning more safe languages like python/Java/whatever they use now I don’t keep track.

Who talked about writing servers?

My point was that C++ is a clusterfuck, a bloated language that brings pain and suffering to the universe. for me C is much better because it is MUCH more simple, but also not my favorite language btw

Writing servers is just an exaggerated example. Server software pushes requirements to limits. It’s just when you write other apps you may ignore some issues. They are still there tho, just less relevant.

Does C have ways to guarantee resource release? No. Does C have safe pointer management? Again no. So, given the same magnitude of the project, you can write more secure, safe and stable code in C++ comparing to C.

oh dear god, nevermind

Quoting Torvalds:

" 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 "

Can a mod move this stuff to an off topic thread? Thanks

nginx, apache.

I agree that C ++ is a little safer than C, but it also requires very careful use.

I think let C die in peace!

What about the 24,957,215 lines of C (95.7%) of the Linux Kernel powering servers, 2.5 billion smartphones, the International Space Station? :slight_smile:

EDIT: And apparently C is still quite popular for some reason.

Yes, but the majority of android apps are not create from C.
The reason why C is popular in research and development, and hardware driver interface is because there is not many alternative. Most hardware libraries are created in C.
In terms of software application, there are many language variant. Some people love pascal, fortran, C++, Java, C#…

But for the really important parts (like performance) don’t they usually have to resort to the NDK?

By the way, doesn’t this very forum run over Nginx (which is C) with PostgreSQL (which is also C) and Redis (also C)?

Looks like C is still carrying a lot of the software world. :slight_smile:

EDIT: The popularity of C could also be because C is simple. And simple things usually work pretty well.

A C library can be wrapped and hidden away, as most of our third party libraries should be hidden away regardless of if they’re C or C++. Unless someone is seriously considering re-writing Urho3D as a C library, then this isn’t really a useful argument at all. There hasn’t been a productive or interesting C vs C++ flame war in the history of the internet, so I don’t know why anyone would assume now was the time to have one.


Just out of curiosity: