When we say Flash what most people really mean is the browser plugin, right? Or you know, maybe the superhero.
But Flash was, still is, an ecosystem which includes stuff like Adobe Air, Animate CC, and most importantly the language ActionScript 3 (AS3).
You might be wondering why the hell I’m writing about Flash after luring you with this title. I am sorry, but I assure you it will make sense in a few more lines.
There and back again
One version I’ve found is that it was feared that EcmaScript 4 would not get sufficient adoption. It was an ambitious proposal, but with ambition comes change, or in technical jargon breaking changes.
The other version, the juicy one, is that EcmaScript 4 was a political problem. Adobe was behind AS3 and TC39 was formed by members from other corporations such as Microsoft. Back in 2008 Chrome was a few months away from its first release, and there was this thing called Silverlight which was trying to compete with the Flash Player for the interactive rich media podium.
In any case, TC39 decided that efforts should be focused on an incremental upgrade with backwards compatibility. This resulted in EcmaScript 5 (ES5) a few years later which is still the most extended version in current browsers.
So what was so great about AS3 back in 2006?
AS3 had real classes with access modifiers, a feature that is still missing in ES6 or even Es7 as far as I know. We were writing components in AS3 before Facebook even existed.
I cannot emphasize this enough. Writing OOP code without types is like driving a real car vs playing with RC cars. TypeScript, which is all the rage these days, was basically created to get a real type implementation which JS still lacks.
Yep, AS3 had interfaces too like other “serious” languages such as Java or C#. TypeScript implemented those too.
Modules and packages
We now have imports in ES6, but those are still quite primitive. For example in AS3 you could import all the classes from a folder or package by simply using:
This would be handy for example in those never ending React Router configuration files, where each and every React component has to be explicitly imported. I reckon this would have implications other than just the syntactic aspect, but still.
Default function parameters
A nice feature that was only recently added in ES6.
Or ahead-of-time compilation. One of the nifty new advanced features in Angular.
As in, something that cannot change during runtime.
And remember. We had those features 10 years ago.
Is AS3 dead?
The real sad part is that AS3 didn’t die because it was a bad language, on the contrary, it’s one of the best things Adobe has ever made. It died because of the Flash Player stigma.
But, just imagine for a moment…
That is all.