This is one of those things that annoys me, with ActionScript 3: the syntax for getting the length of an array is different from getting the length of a generation in XML.
When getting the number on elements in an array, you use length as a property of the array rather than a method. Such as
var max = myArray.length;
But to get this from an XML object, you have to add function brackets like this
var kids = myXML.length();
I'm guessing this is because automatically tracking the number of elements in an array is much simpler than for an XML object....certainly requires less overhead if the XML object is very complex.
Call me lazy, but I don't want to have to remember that length is a property of an array and a method of an XML object. Some consistency in syntax would be nice, even if inside it acts like a property sometimes and method at other times. It gets challenging to remember all this, especially if I'm switching between AS and other languages a lot.