J has a very large set of operators that simplify the creation of complex programs without the need for a library search. It has extremely powerful array processing capabilities, as well as iterative constructs that make explicit control structures inconsequential for most purposes - so much so that I prefer to use tensor algebra to declare an explicit loop, because it is more convenient. J works in the interpreter, but a good J script can be as fast as a program written in compiler language. (When you take out explicit loops, the interpreter does not need to compose the contents of the loop each time it is executed.)
Another interesting feature of J is tacit programming. You can create scripts without explicit reference to the input variables, which allows you to express the idea solely in terms of what you intend to do. For example, I could define an average function as “summing terms in a list and dividing them by the number of entries in a list” as follows:
(+/ % #)
or I could make a script that slices into a 2D array and returns only row averages with averages greater than 10:
(10&<#])(+/%#)"1
There are many other neat things you can do with J; it is an executable form of mathematical notation. Ideas are easy to generalize, so you get great benefits from learning any aspect of the language.
source share