4 ms·
Klong is a different language than Python. Python using numpy would look broadly similar for the first few examples, yes. However, this is a way of executing
by jofer 2y ago
Klong is a different language than Python. Python using numpy would look broadly similar for the first few examples, yes. However, this is a way of executing a different language on numpy arrays. Array languages are a different paradigm. Klong is an array language, while Python + numpy allows some array paradigms, but isn't an array language.
Notice how they're _defining_ the "sum" operation there. Instead of being something builtin, they defined "sum" as {+/x}.
{+/x} is the interesting part. That's Klong. It's not being able to define a "sum" operation, it's that "sum" can be expressed as {+/x}. That's very different than both R and python.