ECMAScript 4: Moock & Francis Cheng
Francis Cheng's blog about ECMAScript4.
Moock's lecture notes can be found here.
- Generic Functions: This functionality will add Java-style method overloading to ActionScript. A function must be defined with the keyword generic, but then mutliple methods (with different method signatures) can be used.
- Iterators and Generators: Increased support for iterating over a series of values using a class defined iterator. Both of these items are very Python-like.
- Proper Tail Calls: A function can properly call another function as its last operation - this adds increased support for recursion patterns.
- New Number Types: byte, double, decimal (and the current generic ‘Number’ type would be removed)
- Numeric Suffixes: As in Java, numeric literals will have suffixes to denote their specific numeric type.
- Vector Type: As in Java, there will be a mono-typed array called Vector. Length can optionally be pre-defined at creation.
- Record Type: Describes the details of an object - easier to create than a class. I believe it is dynamic - in that it has required values, but additional properties can be defined per instance.
- Array Type: A type that describes what will be contained within an array. For example - you could say that you will have a 7-element array made up of Strings.
- Union Types: A property (or argument) could be one of a list of types (as opposed to now where a property has to be of one type - or no type). This would give you the ability to have an argument that could be a String or XML - but nothing else.





