J (programming language)
J is a purely functional programming language, which was developed in the early 1990s by Kenneth E. Iverson and Roger Hui. It is based directly on the programming language APL, developed by Iverson and designed by John W. Backus programming FP and FL.
Since J is in dealing with arrays, and therefore also with matrices, powerful language, it is particularly suitable for solving mathematical and statistical problems. Furthermore, J MIMD ( Multiple Instruction, Multiple Data ) enabled.
Unlike many other languages , which allow object-oriented programming, made possible by the flexible, hierarchical namespace schema of J both class-based and prototype-based programming.
Although J is based on APL, which requires special characters in the source code, but uses only commands and operands that are characters in the ASCII character codes. Thus, some problems that may arise in the encoding of special characters in the source code, bypassed. Commands that are executed in APL characters were, in J replaced by combinations of characters, which are preceded by a period or a comma.
Although J is not the appropriate von Neumann architecture language, but the MIMD architecture is, it can also be used as a von Neumann language.
The following code calculates the average value of an array.
Avg =: / % # avg 1 2 3 4 Issue: 2.5
The avg function consists of the following operations: / sums all elements of the array, % divides the previous operand with the following and # returns the number of elements in the array. After the function definition avg is called with the array as an operand.