3 ms·
There are two key ideas: one is notation as a tool of thought, and thus the symbols are incredibly important (or, if not using symbols, to use similarly lightwe
by icen 8y ago
There are two key ideas: one is notation as a tool of thought, and thus the symbols are incredibly important (or, if not using symbols, to use similarly lightweight notation as in j/k).
In a semantic sense, the key idea is that you compose operations on array indices. A good example of this is k's where operator, &, which converts an array of booleans into an array of indices where it is true. It's very common to take & of some predicate on your inputs, manipulate that for a while, and then index into something else at the end.
There are also ideas of rank/shape ambivalence, which naturally encompasses broadcasting (so scalar + vector broadcasts the scalar, vector + matrix broadcasts the vector row-wise, etc).
You certainly can implement something with APL's semantics as a library - Numpy does this. The magic of using APL comes from having all these features at once.
- iainmerrick 8y agoGreat, thank you! Food for thought and some concrete stuff to research further.