In a previous blog I praised the Scala programming language as the 21st century Scheme.
Since that time I got into contact with ActionScript 3.0 though and have to admit that the title for a 21st century Scheme (at least for the first decade of that century ;-) probably goes to JavaScript 2.0.
To cleanup a potential confusion here, both ActionScript and JavaScript are following the ECMAScript-262 standard and so are brothers if not geminies. The Edition 4 of ECMAScript is now the base for ActionScript 3.0 and JavaScript 2.0. Unfortunately Edition 4 is not finalized yet - neither is JavaScript 2.0 - but ActionScript 3.0 is already shipping. It seems that Adobe - the 'creators' of ActionScript - want to speed up the standardization process by taking some decisions on their own. Decisions which can take forever in a gremium - as many of you know by your own experiences.
JavaScript is one the the worlds most used programming languages as it works in nearly every browser out there. The great thing here is that it is a true functional language which I define as having closures. So, at the beginning of the 21st century one of the most used languages is a functional one and that really gives hope.
ActionScript3.0 (i.e. ECMAScript Edition 4) improves a lot on the previous versions and introduces packages and classes as familiar concepts:
* Packages allow to group names into APIs and prevent clashes between same names of different APIs.
* Classes allow an object orient programming style which is more in-line with what most people expect and know from other languages than the prototype based approach of previous ECMAScript Editions. The prototype mechanism is still there in Edition 4 but I expect that most people will switch to the class based concepts instead.
Other new features include optional type annotations (with algol like colon separated postfix syntax ;-) and properties (a.k.a. getter and setter functions).
Independent from Edition 4 is the E4X (ECMAScript for XML) standard which allows to structure and destructure XML within the language. Such a feature is invaluable in todays XML centric worlds and corresponds to the s-expr readers and writers of Scheme.
Missing from ActionScript3.0 is a pattern matching facility as in Scala or other functional languages like ML. But I could imagine that an Edition 5 could include this as the literal object notation '{}' of ECMAScript is beneficial for this task.
Finally, macros are missing but I expect that this could become a trend in the second decade of this century for several languages.
So, contrary to my previous believes the quest for a Scheme successor has not stopped and will go on and on.
JavaScript2.0 - ActionScript3.0 - ECMAScript Edition4 are good contenders though and really fun to program in.
The fun has just begun.
Subscribe to:
Post Comments (Atom)
1 comment:
Hope you don't mind late comments, this post answered *just* what I was wondering (namely, what's up with those colon-types in ActionScript, vs JavaScript, a, ha, that version of ecma isn't ratified & in the browsers yet.) Thanks!
Post a Comment