| The examples in the paper are in APL which uses a special, non-ascii character set to express its syntax. J uses the standard ASCII character set. Readability comes with familiarity. If you want closer to natural language for programming then see Inform [1]. I think readability in Inform hinders compos ability and adds up to some lengthy programs. Mathematicians take the time to familiarize themselves with Greek letters, and other seemingly odd symbols, so it can be understood across cultures and languages, and is succinct. In APL, you can change indexing from 0-based to 1-based. In J it is 0-based, so the need to increment the sequence with the increment verb '>:' as follows: +/\>:i.5
1 3 6 10 15You could also rename or group and rename functions for readability if working with others not familiar with J: range =: >:@(i.) NB. @ joins the two verbs increment (>:) and index (i)
range 5
1 2 3 4 5 add_reduce =: +/\ NB. rename +/ (plus apply) and \ (infix)
add_reduce range 5
1 3 6 10 15 +/ range 5 NB. This is a comment (from the Latin 'Nota Bene')
15I am playing with Idris, and do not know Haskell much, but I still find it more like mathematics when composing functions in J as opposed to Idris/Haskell. I see Idris/Haskell as more easy to express the proofs in a style to a proofs textbook, but I see J as more representative of the actual mathematical formulas. They are short, and can be easily manipulated without so much typing. People sometimes criticize J/K/Q/APL the way they do when they write about Forth or Lisp, but it doesn't take away from them. The Rosetta lander had a lot of mission-critical code in Forth, but there are not many who like the syntax or way of composing programs. J's learning materials have greatly improved from when I first looked at it [2]. kdb+/q beats the pants off of Spark, and Jd is the J programming language's answer to kdb+/q. Array processing with a language that has arrays as its fundamental unit makes sense, and that is where it is all headed. Whether it is one of the existing array languages or a hybrid is the question. All those high salaries programming in Q is not a myth, and companies don't pay for no return on salary. FYI - The creator of Pandas, Wes Mckinney, was studying or looking over J for his next venture. The link seems to have disappeared, so perhaps it is not in development, or it is being developed in secret!;) [1] http://inform7.com/ [2] http://code.jsoftware.com/wiki/Guides/GettingStartedSerious |