Talk:Loop over multiple arrays simultaneously

Revision as of 06:58, 19 November 2009 by MikeMol (talk | contribs) (Suggestion)

Task clarification required?

It seems that some of the solutions have assumed that each of the arrays are of the same type (string) while others have assumed that the array (1,2,3) is a list/array of integers. The result is that solutions provided by any two languages do not necessarily solve the same task and are not necessarily directly comparable.

It might help readers compare the languages more easily, if the task be clarified to either specify that the code should handle arrays of different types, or that all arrays are the same type. --Tikkanz 00:21, 19 November 2009 (UTC)

True, bit which to choose? --Paddy3118 03:27, 19 November 2009 (UTC)
I would suggest making a "same type" a primary goal for languages where it's convenient, and a second, separate "generic" example a secondary goal, and note which example goes with which goal. This keeps it simple for languages which support strong typing, allowing a little more showing off for languages with generics, and doesn't add a nonsensical requirement for languages with weak typing. --Michael Mol 06:58, 19 November 2009 (UTC)
Return to "Loop over multiple arrays simultaneously" page.