Array model: Difference between revisions

Jump to navigation Jump to search
33 bytes added ,  20:04, 29 September 2020
→‎External links: Add references
(Based array model)
(→‎External links: Add references)
(One intermediate revision by the same user not shown)
Line 60: Line 60:
=== Mutable based arrays ===
=== Mutable based arrays ===


In many languages with this array style, such as NumPy and Julia, the arrays are [[wikipedia:Immutable Object|mutable]], meaning that copies of an array can be made, so that one copy reflects changes made to any copy. In contrast, APL operations that appear to modify an array, like [[indexed assignment]], will only change the particular copy of the array used, and can be said to create a new array rather than change an existing one: there is no special connection between the old and modified array. Mutable arrays make it possible for an array to contain itself, by replacing one element of an existing array with the whole array. This means that more values are possible than in an immutable based array language, and that some properties of immutable arrays, such as a finite [[depth]], do not hold.
In many languages with this array style, such as NumPy and Julia, the arrays are [[wikipedia:Immutable object|mutable]], meaning that copies of an array can be made, so that one copy reflects changes made to any copy. In contrast, APL operations that appear to modify an array, like [[indexed assignment]], will only change the particular copy of the array used, and can be said to create a new array rather than change an existing one: there is no special connection between the old and modified array. Mutable arrays make it possible for an array to contain itself, by replacing one element of an existing array with the whole array. This means that more values are possible than in an immutable based array language, and that some properties of immutable arrays, such as a finite [[depth]], do not hold.


== Other features of the array model ==
== Other features of the array model ==
Line 107: Line 107:
* [https://www.sacrideo.us/tag/apl-a-day/ APL a Day] series
* [https://www.sacrideo.us/tag/apl-a-day/ APL a Day] series
* [https://www.jsoftware.com/papers/array.htm What is an Array?] by [[Roger Hui]] (in [[J]])
* [https://www.jsoftware.com/papers/array.htm What is an Array?] by [[Roger Hui]] (in [[J]])
== References ==
<references />
{{APL features}}[[Category:Arrays| ]]
{{APL features}}[[Category:Arrays| ]]

Navigation menu