Is it fine to display the output of Array.toString()
to the user, or is there a possibility that the string format could change in future versions of ActionScript 3 or other compilers?
Is Array.toString() guaranteed to remain as is in ActionScript 3?
532 Views Asked by Tim At
3
There are 3 best solutions below
0

Return value of Array.toString()
is by now equal to that of Array.join()
.
If you are that concerned about this behaviour not changing, use Array.join()
(or, to be completely pedantic, Array.join(',')
) explicitly, and you'll be safe. Joining array works this way since ActionScript exists and it's absolutely unlikely that Adobe will change something to it and loose backwards compatibility (and, well, sanity).
Here's an excerpt describing Array.toString from ECMA-262, which ActionScript 3 follows very closely:
And Array.join:
So, the default behavior is very well defined, and won't change.