APL versus A versus J versus K?

前端 未结 7 1031
挽巷
挽巷 2021-01-29 21:55

The array-language landscape, while fascinating, is confusing to no end. Is there a reason to pick one of J or K or APL or A? None of these options seem to be open-sourced --

相关标签:
7条回答
  • 2021-01-29 22:37

    Something to consider is the vocabulary of operators (higher-order functions).

    Original APL only has last and first axis reduction (fold) (f/, f⌿), last and first axis cumulative reduction (f\, f⍀), plus inner and outer product (f.g, ∘.g).

    Most extended APLs (e.g. GNU APL, APLX, APL+Win, APL2) only add the each-loop (), and axis bracket specification (f[...]).

    J, added a plethora (called adverbs and conjunctions), but removed brackets (both axis and indexing), the each operator (in favor of the more general rank operator), and last-axis (cumulative) reduction.

    The now defunct Sharp APL (and later SAX) retained both the traditional last-axis operators and bracket indexing, while adding many of J's new operators.

    Dyalog APL is gradually approaching the vocabulary of Sharp APL, but has also incorporated J-exclusive operators that never made it into Sharp APL.

    The below table compares J, Sharp APL, and Dyalog APL composition vocabularies. The entries with faded text require two symbols to effect. The entries with grayed background are under proposal.

    0 讨论(0)
提交回复
热议问题