Array notation: Difference between revisions

Jump to navigation Jump to search
12 bytes added ,  14:11, 22 August 2022
→‎Language support: Mark Dyalog as no function arrays with clarification, as the table's just about array notation
(→‎Language support: Clarify assignable and change to No for Dyalog)
(→‎Language support: Mark Dyalog as no function arrays with clarification, as the table's just about array notation)
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}}   || {{No}}
| [[Dyalog]] ([[Array_notation_in_Dyalog_APL|proposed]])
                        || <code>(⋄)</code> || <code>[⋄]</code> || <code>(key:val⋄)</code> || {{No|No (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. 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.
The "Function arrays" column indicates whether functions can be placed in array notation ([[function array]]s can be created in Dyalog by another method). "First class" indicates that functions are first class, so this is possible without special consideration; in Nial and dzaima/APL vectors of functions 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.


== External links ==
== External links ==

Navigation menu