views:

77

answers:

2

I'm a decent AS3 programmer. I work in games, and that is my reason for programming. While there is much I can accomplish with Adobe AIR, my understanding at this point is that learning C++ is probably a good direction to take. I would learn a lot of valuable lower level programming if I needed it down the road, and I would have an easier time learning other C oriented languages. I see a lot of information for people looking to learn AS3 who know C++, but not the other way around.

Why C++? Cross platform compatibility is important to me, so I'm not particularly interested in C# or Objective-C at this junction. I'm also aware of HaXe, and while I love the concept, after doing some research I'm worried about investing a lot of time into something so recent with limited learning resources and documentation.

I'm looking for advice and resources (books, articles) related to this topic. Thanks in advance!

+2  A: 

I don't think you're going to find much help that is tailored to people that know AS3 looking to learn C++. It's a bit too specific.

Essentially, your AS3 experience will help with your general ability to program, formulate algorithms and classes, but very little of it is relevant to the way C++ works.

As such, the best I can offer is what others have offered before. These are a couple of threads with links to good resource:

What is the best source to learn C++?

What is the best way to learn C++ if I have a bit of other programming experience?

In general, I'm against any tutorials that try to teach a language in terms of another; it's like to trying to learn a new foreign language by translating every word -- it just doesn't work. You have to learn a language in its own terms to fully appreciate it.

Peter Alexander
I disagree with your last point. For example knowing latin and english is very helpful for learning french. There are similarities between languages and there are differences and learning one language using another is accomplished by understanding both. That's also how you learn a foreign language based on your own. It's about the same with programming languages. The only (very common) error you must not do, is to try just translating, instead of using the language's proper idioms to express what you intend to (be it in a sentence or a program).
back2dos
A: 

About haXe: I personally see no risk in using it. I completely switched to haXe from AS3 about 9 months ago, and I feel it was a very good decision. AS3 has completely stalled since its release. Sure, the player API has grown, but the language itself hasn't evolved, except for the introduction of typed vectors.

While I feel that your general concern towards haXe is unjustified, I have to point out, that haXe/cpp is a different beast. Although the project is very promissing and ambitious, it does have its problems. Many cool haXe features are translated into C++ with serious overhead (although in performance critical situations you can simply avoid them). Also the resulting code is really not nice to read, debugging is not really obvious (you can debug the code, but you than have to fix the problem in the original haXe source) and there is no canonical way of using the haXe output from C++ in a decent way. And the C++ platform is known to have minor quirks, although it has become reasonably stable.

The question is now, what exactly you're trying to achieve learning C++. haXe/cpp is a decent way to use a high level language getting about the same performance as C++, while staying even more cross platform. IMHO, from an AS3 point of view, the most interesting thing about C++ is its low level access and the templates, both of which are very powerful aspects.

To me, AS3 is basically a poor man's Java, except for the mostly unused dynamic and functional traits. Thus, if you are determined to learn C++, I would suggest, you try learning C++ from Java.

greetz
back2dos

back2dos