The question is... which array language should I pick? What are the reasons to pick one over the other?
The question is... which array language should I pick? What are the reasons to pick one over the other?
I don't really like J but the only serious APL left is the proprietary (though free, and fun) Dyalog; K, the official product, is also proprietary and because Arthur rewrites it every couple of years all the open source clones are of different versions so there isn't much of an ecosystem.
the down side is that subjectively some people (myself included) find J uglier, less effective as a tool of thought and due to some syntactic features (hooks and forks, but no proper lightweight anonymous function syntax)-prone to people posting impenetrably dense code as "examples"
In dyalog you can (as of about v13) do that if you want, or you can just use curly brackets { and inside of them have lexically scoped variables, multiple expressions, recursion and if/then (no loops either though) }
N.B. a sibling says J has added a direct definition construct while I wasn't watching which renders my comment largely irrelevant although the I feel general point that a lot of J 'example code' tends towards difficult-for-noobs to parse verb trains still holds.
{{(-&2 +&$: -&1) ^: (1&<) M. y}} 155x
It'll run in your browser in 0.003 seconds.
https://jsoftware.github.io/j-playground/bin/html2/#code=%7B...
i would also recommend BQN. it has an active community and it's designer Marshall Lochbaum explicitly tried to address some of the warts in APL and j. he's done a great job.
learning any of the array languages will be a tremendous learning experience if you haven't approached the paradigm before
Not that I have any firsthand experience with the matter, but I think Morgan Stanley has been switching over from K to some Haskell-like dialect as well.