Array programming: Difference between revisions

Content deleted Content added
Danakil (talk | contribs)
added Fortran 90
Danakil (talk | contribs)
expanded description
Line 1:
'''Array programming languages''' (also known as '''vector''' or '''multidimensional''' languages) generalize operations on [[scalar]]s to apply transparently to [[vector]]s, [[matrix|matrices]], and higher dimensional arrays.
 
The fundamental idea behind Array Programming is that operations apply at once to an entire set of values. This makes it a [[high-level programming]] model as it allows the programmer to think and operate on whole aggregates of data, without having to resort to explicit loops of individual scalar operations.
 
Array Programming primitives concisely express broad ideas about data manipulation. The level of conciseness can be dramatic in certain cases: it is not uncommon to find APL or J one-liners that more than a couple of pages of Java code.
 
Array Programming is very well suited to implicit parallelization; a topic of much research nowadays.
 
[[APL programming language|APL]], by [[Ken E. Iverson]] is the original language that provided Array Programming capabilities,
 
==Overview==
In scalar languages like FortranFORTRAN, C, Pascal, Ada, etc. operations apply only to single values, so a+b expresses the addition of two numbers. In such languages adding two arrays requires indexing and looping:
 
'''FORTRAN 77'''
Line 27 ⟶ 35:
==Examples==
Some examples of array programming languages:
:[[APL programming language|APL]], [[J programming language|J]], [[K programming language|K]], [[NGL programming language|NGL]], [[ZPL programming language|ZPL]], [[NESL programming language|NESL]], [[NIAL programming language|NIAL]], [[FISh programming language|FISh]],[[Fortran programming language|Fortran 90]], [[F-Script programming language|F-Script]]
 
==External links==