2 posts tagged “c++”
Java will eventually be as fast as C++. Just as C became as fast as Assembler, so too will Java be as fast as C++.
Syntheticist was first told this about five years ago. The message was repeated about once a year, in various Computer Science classes that Syntheticist attended. It is hard to argue that this is yet the case, at least in the realms of video games.
For those that don't know about C++, the Wikipedia article is a great starting point. Syntheticist has tried, and failed, on multiple occasions, to learn C++. The language is perhaps the most ubiquitous, and yet, one of the most difficult, that exists in modern programming. The syntax can be bizarre, it has a deep-reliance on programmer-handled pointers, and the memory management is difficult. While implicit memory management is of course necessary in performance-critical applications like C++, examples such as Objective-Cs retain/release paradigm simply make more sense to a great number of people. C++'s supposed object-orientation strength is not leveraged by the inclusion of a set of libraries in a standardised way. By this Syntheticist means there is no equivalent of the Java API, or Perl's CPAN library, or Ruby's RubyForge. If you need an add-on to C++, you simply have to hit Google and hope your search comes up good.
In fact, the first chapter in Buckland's book spends a fair chunk of time with the implementation of message passing and writing dispatcher code. Syntheticist has seen this before... it is included for free in Mac OS Xs Cocoa libraries, and the syntax was far more understandable and documented than a homebrew version. This is not a slight on Buckland, who does a pretty fantastic job of illustrating what is happening, but this is something that should be available for free somewhere. Syntheticist wants to design AI routines, not implement the foundations every time. Syntheticist can only presume that C++ programmers keep libraries of their own homebrew versions of everything many graduates expect to find in their language libraries.
C++ is an anachronism to many computer science graduates; neither as object-orientated as Java, or as clean as C. Objective-C is more object-orientated, but lets you write in full ANSI C code for the portions of execution that are the most performance-critical. Yet for now, C++ overall is the fastest language to develop and execute programs, so of course it is the de-facto standard for video game development.
If you are learning C++, as Syntheticist is now destined to attempt once more, the C++ How to Program books by Deitel & Deitel are very well written, and do as good a job as can be hoped for when it comes to introducing you slowly to the task at hand.
If anyone would like Syntheticist to expand on this post with a few examples, leave a comment below. Syntheticist will keep you updated as the progression through the book continues.