OK, just pushed a fix for Namespace and Qname.

Scanning our generated JS code shows that many implicit coercions are
still being generated, but as far as I can tell they are all "correct".
We could do more "guessing" like assuming that
someArray[someIndex].substring() is really going to return a string.  What
do others think?

Otherwise, we should go fix up stuff like this by using
@flexjsignorecoercion String and writing:
   (someArray[someIndex] as String).substring()

It is a classic example of what kinds of things would be caught if we ever
create a "super-strict" mode that warns on every access of type "*" and/or
"Object".  It is easy to lose type-safety in ActionScript.

We could also use @flexjsnoimplicitstringconversion but there might be an
advantage to being more strict about types in our code, especially if you
take the time to use typed local variables instead of repeating the "as
String" on more than one line of code.  It might allow the JS runtime to
do more type inferencing and speed things up.

Thoughts?
-Alex

Reply via email to