Jump to content

Talk:Comparison of programming languages (array)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ty8inf (talk | contribs) at 01:27, 29 January 2008 (Does php support vectorized operations?). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Vectorized Operations in Python

Are you sure that native python supports vectorized operations? I am under the impression that this requires an external set of packages such as numpy. If so, then "yes" in the vectorized column is a bit misleading and a footnote should be added explaining this.

I did a quick test in python2.4:

 Python 2.4.4 (#2, Apr  5 2007, 20:11:18) 
 [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> x = [1,2,3]
 >>> y = [4,5,6];
 >>> x+y;
 [1, 2, 3, 4, 5, 6]

So it appears that native python does not provide such support.

Multi-dimensional arrays vs. Arrays of arrays

The table would benefit if there were two columns. One for support for multi-dimensional arrays and the other for support for arrays of arrays. I think it's always true that a language supporting arrays of arrays can emulate multi-dimensional arrays, so this fact should be in a paragraph and not a footnote. I also think it's always true that a language supporting arrays of arrays can have triangular arrays. That may be worth mentioning also. Unfortunately I'm not knowledgable about all the languages in the table to make the change myself. —Egriffin (talk) 21:31, 23 January 2008 (UTC)[reply]

Default base index in Ada

I'm not sure it's correct to say that Ada has a default base index; the base index is always specified explicitly when the array is declared. However it does appear that Ada culture is 1-origin; for instance, the dimensions of a multidimensional array are numbered from 1 in attribute invocations. ScottBurson (talk) 18:24, 27 January 2008 (UTC)[reply]

Vectorized Operations in PHP

I know that PHP defines array slices, but I see nothing to indicate that PHP supports the type of vectorized arithmetic operations that pertains to this article. Could someone knowledgable comment on PHP's capabilities in this area? -- Ty8inf (talk) 01:27, 29 January 2008 (UTC)[reply]