I made some updates to the possible
Array Documentation.
Is it desirable to introduce this split between arrays and objects?
I believe so. I would say arrays are a regular/newbie concept, whereas objects
(particularly custom objects) are an advanced topic. I may have just made some programmers cringe, but I propose: picture an object ... ... ... I'd bet 10 different people - particularly non-programmers - would have 10 different pictures come to mind. An object is an abstract concept - the base for building other things. In contrast, arrays are pretty-strait forward. Plus, the AHK Documentation already has
Arrays.
I think it's missing some explanation in using Object() itself; even though it's obviously not preferred to the JSON syntax ...
I would partially propose the previous explanation, but you are referring to the
Array &
Object functions vs using brackets. IMO, since we are just introducing arrays at this point, lets stick with the preferred syntax. The user can always find the
Array/Object function later.
... the MaxIndex()/MinIndex() portion ...
I wanted to present a regular array as being a 1-based, continous, numerical indeces object. Once the user can grasp that, I believe they can start modifying arrays however they want. At that point,
Min/MaxIndex() hopefully would logically make sense - especially considering that they are named
Min/MaxIndex() rather than just using
count or
length.
Additionally, in the Arrays vs Associative Arrays I think you should show how the same array (in effect) is built using both notations ... ... ... Lastly, I think the for-loop should ... be presented in both sections as a means of enumerating an array.
Done