Why ActionScript 3.0 should be your first programming language
Last week, a Twitter friend asked about learning programming and where to start. I suggested ActionScript 3.0, but 140 characters isn't enough to explain why. That's what blog posts are for.
That stuff is true, or will be in the near term. Yet I still think ActionScript 3.0 is worth learning, and that it's a great starter language for budding developers. Here's why.
- ActionScript 3.0 is syntactically similar to other C-style languages. Curly braces rule! Semi-colons are awesome! Getting comfortable with how AS3 looks and works will make PHP or Java less intimidating.
- ActionScript 3.0 is strongly-typed. Strongly- (or strictly-) typed languages enforce rules for variable behavior. It's particularly useful when debugging, and will help you understand what different variable types are and how they work across languages.
- ActionScript 3.0 supports Local Shared Objects, which is similar to HTML5 storage, and other key-value based datastores. Yep. Local storage "super cookies" have been available in Flash for years now. Learning how to use them in Flash and ActionScript will help you transition to an HTML5 future. What's more, key-value datastores are the next wave of databases. The data structure for a “NoSQL” store is similar to those for a local shared object.
- ActionScript 3.0 supports event-driven programming. Event listening and handling is critical to game development or interactive experiences in which the sequence of user input can't be (or shouldn't be) controlled. Knowing how to generate, add and remove elements from the stage, or when an item can be safely garbage collected are portable concepts that you can learn with ActionScript.
My point with this post isn't to start a language holy war. I'm not even sure I like ActionScript, plus my first programming language was actually PHP. Still I recognize that the way ActionScript works and as importantly, how it's used provides a nice foundation for beginning developers.