3 ms·
I know a fair bit of J, but never used K. What do you mean by "more generic"? I'm interested.
by rscho 6y ago
I know a fair bit of J, but never used K. What do you mean by "more generic"? I'm interested.
- beagle3 6y agoIt has 3 data shapes: atom, list, dict. Lists of elements of the same kind are called a vector, are more efficient, and are like J/APLs one dimensional array - but semantically are the same as any other list. A matrix is represented by a list of lists. No specialization there. You work on the 2nd dimension with “each”, on the 3rd with “each each”. Integers are all 64 but, but storage expands and contracts based on actual range. There is one operator for both “where” and “replicate”, one operator used for both “or” and “max”, similarly “and” and “min”. K is less pure and prefers to reuse concepts like lists instead of having more complicated (though sometimes helpful) structures like multiple dimensions. Hope that helps.