ActionScript 3, … (rest) parameter, finally!

Yesterday I was reading the latest actionscript 3 documentation on adobe labs and I found that they finally introduced the … ( rest) function’s argument, as also described in the ECMA Script 4 specifications. Do Not Send A Resume I say “finally” because it’s since I discovered python *args and **kwds function arguments that I pray for them also in actionscript. In actionscript3 rest parameter is used for example:

http://www.vlatkahorvat.com/?what-can-i-do-for-my-nation-essay What Can I Do For My Nation Essay
public function log(message:String, ... rest):void Fallacies Critical Thinking { logging.text += message + "\n";
for(var i:uint = 0; i < rest.length; i++)
{
logging.text += rest[i] + "\n";
}
}
log("hello", "spammed", "world");

The reference says about the rest parameter: specifies that a function will accept any number of comma delimited arguments. The list of arguments becomes an array that is available throughout the function body.
Now I just will wait till they will intoduce also the **kwds python equivalent parameter and I will an happy man! 🙂
Read more here