Template:Comparison of array notations

From APL Wiki
Revision as of 06:58, 8 September 2022 by Adám Brudzewsky (talk | contribs) (Created page with "== Comparison of array notations == The following systems support list or vector notation in some form, beyond simple strand notation. The separators <code>;</code> in A+...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Comparison of array notations

The following systems support list or vector notation in some form, beyond simple strand notation. The separators ; in A+ and K, and in APL and BQN, indicate any separator, including a line break.

System Vectors High-rank Namespaces Function arrays Assignable
Nial [,] No N/A Special No
A+ (;) No N/A First-class Yes
K (;) N/A [key:val;] First-class Yes
BQN[1] ⟨⋄⟩ [⋄] {key⇐val⋄} First-class Yes
dzaima/APL (⋄) [⋄] (key:val⋄) Special No
Dyalog Link (⋄) [⋄] (key:val⋄) No No
Acre Desktop[2] (⋄) [⋄] [key←val⋄] No N/A

Nial and A+ do not support namespaces, while K does not support high-rank arrays, so any such notation is not applicable. The "Function arrays" column indicates whether functions can be placed in array notation. "First class" indicates that functions are first class, so this is possible without special consideration. "Special" indicates creating a special vectors of functions that can be applied to arguments to return a list of results. The "Assignable" column indicates that array notation can be used as an assignment target to perform destructuring. BQN's namespaces don't use a dedicated construction; instead, any block (like a dfn) with statements returns a namespace reference. Acre Desktop only uses array notation for storing literal arrays; it cannot appear in executable code.

  1. Lochbaum, Marshall. BQN: Array notation and display; Array literals. Retrieved 2022-09-01.
  2. The Carlisle Group. APL Array Notation. Acre Desktop Wiki. GitHub. Retrieved 2022-09-01.