Because of my ventures into the waters of Objective-C I’ve started to take another look at C. Why you ask? This is because Objective-C is just a thin layer on top of C, which means that anything that is written in C is also written for Objective-C.
So do people still use C? I haven’t used it in over 7 years and it was standardized in 1989 (that’s a very long time in computer years). As far as my personal experience goes, no, no one uses it anymore. But is that really the case? According to TIOBE (http://www.tiobe.com) C is the second most popular programming language in the world (C++ is third, C# is seventh.) Apparently, I’ve been hanging out with the wrong crowd.
So everyone is using C, so a simple Google search should return all sorts of cool libraries for me to play with right? I’m interested in game development, so what game libraries/frameworks/engines can I use? (If you’re wondering why I’m looking for libraries in C instead of Objective-C then see here) So I checked out 18 different open source game engines/libraries/frameworks. Only 5 of them where written in C (and a few where pretty dated). Eight of the 18 engines where written in C++, 3 in C#, 1 in Python, and 1 in Java. Most of the professional game engines I looked into where C++ with one notable exception, the ID Tech engine (Quake games) which is C. All this means that about 28% of game engines are in C while 45% of them are written in C++. It defiantly looks like C++ has the home field advantage.
What about something like databases? SQLite is written in C (I’ll post more about it later). MySql is a mix of C and C++, PostgreSQL is C, and Oracle is C and assembly. Here it looks like C is king. I don’t know if this is due to historical reasons (doubtful in SQLites case) or if there is just something about C that tends its-self easer to database development.
While C is popular and a lot of software is still written in it, it seems to come down to what you want to accomplish. Game development has a strong tint of C++. Luckily, if you only care about developing for OS X you can have the best of all worlds. Xcode lets you mix C and C++ with Objective-C.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment