Variant: Difference between revisions

Jump to navigation Jump to search
22 bytes added ,  17:56, 1 June 2022
m
→‎History: Dyalog version number
(Created page with "{{Built-ins|Variant|⍠|⎕OPT}} or '''Custom''' (<code>:</code> in A Dictionary of APL<ref>Ken Iverson. A Dictionary of APL. [https://www.jsoftware.com/papers/APL...")
 
m (→‎History: Dyalog version number)
Line 7: Line 7:
Variant dates back all the way to [[Iverson notation]] where a subscript was used to indicate which [[index origin]] a [[primitive]] would operate under. This system was dropped in [[APL\360]]. Instead, the [[system command]] <source lang=apl inline>)ORIGIN</source> was provided for controlling the interpreter's global setting. This was then supplemented with a [[system variable]] to control the global state. Though this feature is still present in many APL systems, together with numerous other system variables for controlling other aspects of the system, for example [[comparison tolerance]], these global settings were recognised as an unfortunate design in that every programmer would be forced to set and localise every system variable that could affect the given code. Later, [[Ken Iverson]] envisioned a return to a per-invocation setting, similar to the original notation, but this time in the form of a dyadic operator that would customise [[primitive function]]s.
Variant dates back all the way to [[Iverson notation]] where a subscript was used to indicate which [[index origin]] a [[primitive]] would operate under. This system was dropped in [[APL\360]]. Instead, the [[system command]] <source lang=apl inline>)ORIGIN</source> was provided for controlling the interpreter's global setting. This was then supplemented with a [[system variable]] to control the global state. Though this feature is still present in many APL systems, together with numerous other system variables for controlling other aspects of the system, for example [[comparison tolerance]], these global settings were recognised as an unfortunate design in that every programmer would be forced to set and localise every system variable that could affect the given code. Later, [[Ken Iverson]] envisioned a return to a per-invocation setting, similar to the original notation, but this time in the form of a dyadic operator that would customise [[primitive function]]s.


Even [[SHARP APL]] didn't implement Iverson's idea, but J did. [[Dyalog APL]] repurposed it as a way of providing auxilliary arguments to [[system functions]] and [[derived function|functions derived]] from [[system operators]], but not for primitives.
Although [[SHARP APL]] didn't implement Iverson's idea, [[J]] did. Later [[Dyalog APL 13.0]] (2011) repurposed it as a way of providing auxilliary arguments to [[system functions]] and [[derived function|functions derived]] from [[system operators]], but not for primitives.


== Usage ===
== Usage ===

Navigation menu