Difference between revisions of "KAP"

From APL Wiki
Jump to navigation Jump to search
(inline code to improve sentence flow)
m (Fix Kotlin WP link)
 
(5 intermediate revisions by 2 users not shown)
Line 7: Line 7:
 
| released                = 2020
 
| released                = 2020
 
| developer                = [[Elias Mårtenson]]
 
| developer                = [[Elias Mårtenson]]
| latest release version  = 2020 (unversioned)
+
| latest release version  = 2021 (unversioned)
| implementation languages = [[wikipedia:Kotlin_(Programming_Language)|Kotlin]]
+
| implementation language  = [[wikipedia:Kotlin (programming language)|Kotlin]]
 
| source                  = [https://github.com/lokedhs/array GitHub]
 
| source                  = [https://github.com/lokedhs/array GitHub]
| platforms                = JVM, Native, In-browser, [[wikipedia:Node.js|Node.js]]
+
| platforms                = JVM, Native Linux, In-browser, [[wikipedia:Node.js|Node.js]]
| license                  = MIT
+
| license                  = [[wikipedia:MIT License|MIT]]
 
| file ext                = .kap
 
| file ext                = .kap
| influenced by            = [[Dyalog APL]]
+
| influenced by            = [[Dyalog APL]], [[GNU APL]]
 
| run online              = [https://kapdemo.dhsdevelopments.com/ JS Client]
 
| run online              = [https://kapdemo.dhsdevelopments.com/ JS Client]
 
}}
 
}}

Latest revision as of 01:26, 11 February 2021


KAP is an array-based language that aims to implement most of standard APL, along with additional features. Much of standard APL works in KAP, although if an APL feature does not fit with KAP's design, those features are changed or removed.

Lazy evaluation

The main difference compared to APL is that KAP is lazy-evaluated. This means that the language gives the developers very loose guarantees when (or if, and how many times) a function will actually be invoked. For example, f¨ 10 will only make a single call to f because f¨ ⍳10 will not immediately evaluate the result but only return a delayed evaluation. Since all but the first result is then discarded, those results will never be computed.

Differences from APL

The following is a list of significant differences compared to APL:

  • Lazy evaluation
  • All values are immutable, it is not possible to modify the content of an array
  • Ability to define custom syntax
  • Native hash table support
APL dialects [edit]
Maintained APL+WinAPL2APL64APL\ivApletteAprilCo-dfnsDyalog APLdzaima/APLExtended Dyalog APLGNU APLKAPNARS2000Pometo
Historical A Programming LanguageA+ (A) ∙ APL#APL\360APL/700APL\1130APL\3000APL.68000APL*PLUSAPL.jlAPL.SVAPLXIverson notationIVSYS/7090NARSngn/aplopenAPLPATRowanSAXSHARP APLRationalized APLVisualAPL (APLNext) ∙ VS APLYork APL
Derivatives AHPLBQNCoSyELIGleeIIvyJJellyJellyfishK (Q, KDB+) ∙ NialRAD
Overviews Timeline of array languagesTimeline of influential array languagesFamily tree of array languages