Talk:Multi-dimensional array: Difference between revisions

Content added Content deleted
No edit summary
Line 29: Line 29:


:The idea is really to show how good language programmers would agree to implement the task given prior community history and language features rather than inventing something new, but if this is new to the language community then ... --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 08:47, 10 January 2015 (UTC)
:The idea is really to show how good language programmers would agree to implement the task given prior community history and language features rather than inventing something new, but if this is new to the language community then ... --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 08:47, 10 January 2015 (UTC)

== Column-major order in Fortran ==
I removed something a bit silly in the page. It should probably be discussed here before attempting to give a personal opinion.

First, it's silly to compare Fortran to Algol and wonder why Fortran does not follow the Algol convention: Fortran ''predates'' Algol by several years. It's also silly to mention that MATMUL follow this "convention". It has nothing to do with that. MATMUL multiplies matrices, period. Matrices are stored in column-major order, but they could be stored in any way (diagonal order, or any fancy order), that would not change MATMUL's "interpretation": a matrix is a matrix.

There was apparently a misconception in the comment: one must not confuse array ''storage'' order with array indexing. Maybe the use of some programming languages has given the author of this comment the habit to ''think'' that arrays are naturally stored in row-major order, but this is indeed a convention. Some languages follow another convention. Some libraries use still other storage mechanisms to save place (for sparse arrays, triangular arrays, band arrays...). Still, array indexing will probably always be done like in mathematics, that is, A(i,j) is element at row i and column j, whatever the storage peculiarities may be.

[[User:Arbautjc|Arbautjc]] ([[User talk:Arbautjc|talk]]) 07:15, 25 October 2016 (UTC)