Array notation: Difference between revisions

Jump to navigation Jump to search
360 bytes added ,  12:24, 5 September 2022
Note solicitation of feedback
(Note differences between dzaima/APL and Dyalog APL)
(Note solicitation of feedback)
Line 1: Line 1:
'''Array notation''' is a way to write most [[array]]s literally, with no or minimal use of [[primitive function]]s, possibly over multiple code lines. It differs from the [[strand notation]], existing since [[APL\360]], in that it can be used to write arrays of [[rank]] greater than one. This article describes the syntax supported in [[dzaima/APL]], and by some tools for [[Dyalog APL]], where it is planned as an eventual language feature. See also [[Array notation design considerations]].
'''Array notation''' is a way to write most [[array]]s literally, with no or minimal use of [[primitive function]]s, possibly over multiple code lines. It differs from the [[strand notation]], existing since [[APL\360]], in that it can be used to write arrays of [[rank]] greater than one. This article describes the syntax supported in [[dzaima/APL]], and by some tools for [[Dyalog APL]]. [[Dyalog Ltd]] plans to add the notation as a language feature, but has requested community feedback in the hope of ending up with a notation that is shared with other dialects.<ref>Dyalog Ltd/Adám Brudzewsky. [https://forums.dyalog.com/viewtopic.php?f=13&t=1856&p=7431#p7431 Re: Deserialise-- does it work as expected?]. Dyalog Forums. 2022-09-05.</ref>. Such feedback can be left at the discussion page for the [[Array notation design considerations]] article.


The array notation consists of a vector notation written with round parentheses <source lang=apl inline>()</source>, roughly equivalent to stranding, and a high-rank notation using square brackets <source lang=apl inline>[]</source>, indicating the [[Mix]] of a vector. It also supports [[namespace]]s, using <source lang=apl inline>name:value</source> syntax in round parentheses. Elements and [[wikipedia:name–value_pair|name–value_pair]]s are separated by [[statement separator]]s; [[Diamond]]s (<source lang=apl inline>⋄</source>) or line breaks.
The array notation consists of a vector notation written with round parentheses <source lang=apl inline>()</source>, roughly equivalent to stranding, and a high-rank notation using square brackets <source lang=apl inline>[]</source>, indicating the [[Mix]] of a vector. It also supports [[namespace]]s, using <source lang=apl inline>name:value</source> syntax in round parentheses. Elements and [[wikipedia:name–value_pair|name–value_pair]]s are separated by [[statement separator]]s; [[Diamond]]s (<source lang=apl inline>⋄</source>) or line breaks.

Navigation menu