Accessibility
Bruce Eckel

Bruce Eckel

mindview.net

Table of Contents

Created:
23 June 2008
User Level:
Intermediate
Products:
Flex

ActionScript collections and functional programming

Note: This content was first published on Artima Developer.

JavaScript, from which ActionScript is derived, is a bit of a mongrel language and occasionally you'll encounter oddities, which I'll try to point out. However, it seems inevitable that all languages accumulate oddities of one kind or another, and few languages actually remove oddities -- Python 3.0 and an upcoming version of Ruby are the only examples I know of.

Despite the occasional funkiness, the power of the ActionScript language tools along with the hybrid type checking (mostly static for tool support in Flex Builder, but dynamic whenever it's convenient) makes for a programming experience that I find much more straightforward and pleasing than Java.

While much of what I describe here also applies to JavaScript, I have only tested it with ActionScript. JavaScript language features can be different from one browser to the next and also vary with browser versions.

As an aside, I was not a fan of JavaScript after discovering the language syntax and basic features could vary across browsers. Compensating for arbitrary platform differences is not how I want to spend my time. And even though AJAX library creators put a lot of time and effort into writing cross-browser code, you still seem to spend some portion of your time dealing with cross-browser problems, which seems a bad use of brain cycles. ActionScript, however, is learn-once, use-everywhere — you don't have to worry about whether particular language syntax will run on one browser or another.

About the author

Bruce Eckel is the author of numerous books and articles about computer programming. He gives frequent lectures and seminars for computer programmers, and was a founding member of the ANSI/ISO C++ standard committee. His best known works are Thinking in Java and Thinking in C++, aimed at programmers with little object-oriented programming experience. Most reviewers consider these books to be better written and more pedagogic than most introductory texts on Java or C++. He has since made both books available for all to download freely. However, his recent book, Thinking in Java, Fourth Edition, is no longer available in a free, electronic form.