Comparison of APL dialects: Difference between revisions
(Language, navigation box, category) |
(Embed Omnibar) |
||
Line 18: | Line 18: | ||
== External links == | == External links == | ||
* [https://omnibar.rubenverg.com Omnibar] | * [https://omnibar.rubenverg.com Omnibar] lists all glyphs with their meanings and allows custom comparisons between dialects:[[File:Omnibar|center]] | ||
{{APL dialects}}[[Category:Lists]] | {{APL dialects}}[[Category:Lists]] |
Revision as of 13:19, 15 February 2024
All APL dialects share core features, and at least the primitives are backwards compatible with those of APL.SV. However, there are important dialectal differences, the most significant of which are described in this article.
Flat versus Nested
One of the most significant differences between APLs is the choice of array model, namely nested or flat. Originally, all APLs were entirely flat, that is, the only scalar values supported were simple and had to be either numbers and characters, and an array had to be homogeneous, that is, consisting entirely of a single type. SHARP APL introduced the box as a third type, such that a box could hold any other array (including a box array), and this allowed for arrays contain other arrays. NARS introduced the nested array model, where any arrays can be an actual element of another array. Most currently maintained dialects (Dyalog APL, NARS2000, APL2, GNU APL, and others) use the nested array model.
Complex numbers
Most dialects support complex numbers, but some (dzaima/APL, APLX, APL+Win) don't. Dialects with complex numbers also extend Circular (○
) to left arguments designed for complex numbers.
First/Mix
In dialects implementing nested array theory, the two glyphs commonly used for Disclose are Right Shoe (⊃
) and Up Arrow (↑
). The original NARS paper specified monadic ↑
as Mix and ⊃
as First, so Dyalog and STSC implemented Dyalog APL and APL*PLUS accordingly. IBM decided to swap them in APL2, causing the others to implement Migration Level, as APL2 was seen as the authoritative implementation. When the ISO standard was written, it closely followed APL2, causing APLX, NARS2000, GNU APL, and ngn/apl to adopt these notations. However, ngn/apl later switched to follow Dyalog.
Depth
Dyalog APL defines Depth (≡
) to return negative numbers when the depth is uneven. Most other dialects instead define it to return the maximum depth. The original NARS paper assigned the glyph to a function called Simple, which simply answered if the argument was simple or not, without reporting the actual depth. It was thus equivalent to today's 1=≡,Y
.
External links
- Omnibar lists all glyphs with their meanings and allows custom comparisons between dialects:
APL dialects [edit] | |
---|---|
Maintained | APL+Win ∙ APL2 ∙ APL64 ∙ APL\iv ∙ Aplette ∙ April ∙ Co-dfns ∙ Dyalog APL ∙ Dyalog APL Vision ∙ dzaima/APL ∙ GNU APL ∙ Kap ∙ NARS2000 ∙ Pometo ∙ TinyAPL |
Historical | A Programming Language ∙ A+ (A) ∙ APL# ∙ APL2C ∙ APL\360 ∙ APL/700 ∙ APL\1130 ∙ APL\3000 ∙ APL.68000 ∙ APL*PLUS ∙ APL.jl ∙ APL.SV ∙ APLX ∙ Extended Dyalog APL ∙ Iverson notation ∙ IVSYS/7090 ∙ NARS ∙ ngn/apl ∙ openAPL ∙ Operators and Functions ∙ PAT ∙ Rowan ∙ SAX ∙ SHARP APL ∙ Rationalized APL ∙ VisualAPL (APLNext) ∙ VS APL ∙ York APL |
Derivatives | AHPL ∙ BQN ∙ CoSy ∙ ELI ∙ Glee ∙ I ∙ Ivy ∙ J ∙ Jelly ∙ K (Goal, Klong, Q) ∙ KamilaLisp ∙ Lang5 ∙ Lil ∙ Nial ∙ RAD ∙ Uiua |
Overviews | Comparison of APL dialects ∙ Timeline of array languages ∙ Timeline of influential array languages ∙ Family tree of array languages |