No Clean Feed - Stop Internet Censorship in Australia
«
»

AS3

Vectors are great; documentation not so

12.15.08 | 2 Comments

I have no idea how we managed without Vectors for so long … they are a great addition to the syntax.

However. As usual, the documentation leaves a lot to be desired … here’s an example from the LiveDocs, describing the third argument of Vector.splice() – it’s a loosely typed argument:

An optional list of one or more comma-separated values, or a Vector, to insert into the Vector at the position specified in the startIndex parameter.

So what exactly is “a list of comma-separated values”? Presumably a String, but do we really need to have to write code and see if it breaks in order to test the documentation? In any case, why allow a String representation of a list to be the value when the whole point of Vector is to restrict the data type? Strings and primitives can be derived from a comma-delimited list, but most objects cannot. So what’s the point?

related

2 Comments

have your say

Add your comment below, or trackback from your own site. Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

:

:


«
»
Close
E-mail It