Array notation: Difference between revisions

Jump to navigation Jump to search
115 bytes added ,  13:59, 22 August 2022
→‎Language support: Clarify assignable and change to No for Dyalog
(→‎Language support: Clarify assignable and change to No for Dyalog)
Line 63: Line 63:
| [[BQN]]              || <code>⟨⋄⟩</code> || <code>[⋄]</code> || <code>{key⇐val⋄}</code> || {{Maybe|First-class}} || {{Yes}}
| [[BQN]]              || <code>⟨⋄⟩</code> || <code>[⋄]</code> || <code>{key⇐val⋄}</code> || {{Maybe|First-class}} || {{Yes}}
|-
|-
| [[Dyalog]] ([[Array_notation_in_Dyalog_APL|proposed]]) || <code>(⋄)</code> || <code>[⋄]</code> || <code>(key:val⋄)</code> || {{Maybe|Indirect}}    || {{Yes}}
| [[Dyalog]] ([[Array_notation_in_Dyalog_APL|proposed]]) || <code>(⋄)</code> || <code>[⋄]</code> || <code>(key:val⋄)</code> || {{Maybe|Indirect}}    || {{No}}
|}
|}


"First class" indicates that functions are first class, so that an array of functions can be formed directly; in Nial and dzaima/APL function arrays are a special form that can be applied to arguments to return a list of results. BQN's namespaces don't use a dedicated construction; instead, any block (like a [[dfn]]) with <code>⇐</code> statements returns a namespace reference.
"First class" indicates that functions are first class, so that an array of functions can be formed directly; in Nial and dzaima/APL function arrays are a special form 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 <code>⇐</code> statements returns a namespace reference.


"Indirect" indicates that a function array can be produced by taking a member of an array of namespaces that all contain that member, each with its own function value.
"Indirect" indicates that a function array can be produced by taking a member of an array of namespaces that all contain that member, each with its own function value.

Navigation menu