This appendix compares and contrasts a number of aspects of ActionScript, Java, and C++. The goal is to detail differences in three popular object-oriented programming (OOP) languages, since they're so widely used, and during your career as a programmer you may find yourself moving from one of these languages to another.
This appendix uses a structured format to describe the differences between ActionScript, Java, and C++. ActionScript 3, Java 6, and ANSI C++ will be used during this comparison since those are the current versions as of the writing of this book. The general format will be to present a topic and discuss how it is handled in each of the three languages.
Before discussing the languages themselves, some aspects of their runtime environments will need to be discussed to assist in putting this comparison in context.
All three of these languages are compiled languages. ActionScript is compiled into
.swc files that contain ActionScript bytecode. Java is compiled into
.class files that contain Java bytecode. C++ is compiled into actual programs — for instance, on a Windows system you will end up with an
ActionScript bytecode is run in the ActionScript Virtual Machine (AVM). In the case of ActionScript 3, the bytecode is consumed by a Just in Time (JIT) compiler and converted into machine-specific code. Java bytecode is run in the Java Virtual Machine (JVM). It ...