Comparison of APL dialects

From APL Wiki
Revision as of 09:27, 15 February 2024 by RubenVerg (talk | contribs) (Create Comparison of APL dialects page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

While all APL dialects share a few features, there are important distinctions between them. This page's aim is to document the most significant differences.

Flat vs Nested

One of the most significant differences between APLs is the choice of nested or flat array model. Originally, APLs were flat, that is, the only scalar values supported were simple numbers or characters. SHARP APL introduced boxes to the flat array model, which allow for arrays to be elements of other arrays. NARS then introduced the nested array model, where nested arrays inside other arrays are more natural to use. Most currently maintained dialects (Dyalog APL, NARS2000, APL2, GNU APL) now use the nested array model.

Complex numbers

While most dialects support complex numbers, some (dzaima/APL, APLX, APL+Win) don't. Usually dialects with complex numbers support also extend Circular to left arguments designed for complex numbers.

First/Mix

Dyalog APL and dialects based on it define as First and as Mix. Other dialects (NARS2000, APL2, GNU APL, but also Dyalog with migration level 2 or 3) instead swap the two glyphs' meanings.

Depth

Dyalog APL defines Depth to return negative numbers when the depth isn't even. Most other dialects instead define it to return the maximum depth.

Omnibar

Omnibar is a site that lists all available glyphs in the supported dialects and indicates what meanings (primitives) are available in each dialect. It supports search based on the meanings available for each dialect using set operations (union, intersection, difference).