Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

J language: the good part (anyone plan to write a book on it?) [closed]

Tags:

j

As widely discussed in J language community, J code sometimes (e.g. tacit code) can be very difficult to read and maintain.

Contrary to its terminology "verb", "noun", "dictionary", etc, its code doesn't read like English at all, comparing to Ruby, Smalltalk (Objective-C) kind of language.

Instead J is more like a notation (or shorthand, stenotype-kind-to-capture-thoughts). It's different from mathematical formula/notation (which is a better notation to capture thoughts), because it is inherently 1-D, instead of 2-D. And as a computer language, it's burdened with data types, executable, etc.

So my question is whether one can distinguish J notations being the "good part" vs. the "bad part".

The "good part" being: clear, expressive

The "bad part" being: confusing, error-prone

For example: "verb trains" longer than 3 verbs, is it a good idea? Would a code database such as JOD help?

like image 501
Zhe Hu Avatar asked Feb 14 '23 02:02

Zhe Hu


1 Answers

A good question Zhe Hu, and one that the J language has battled for a number of years.

Thinking of J as a tool of thought is intriguing, but that begs the question of what you would like that tool to do. If you want a tool to test out some quick ideas to run on a computer, I have not found one better than J. This is the "good part" of J for me. The "bad part" is that quick prototyping is not suited to have others easily read the code, but that is true for every form of writing that I do.

Taking this post as an example, I wrote the first draft of this response as my thoughts were gathering. Then I reviewed and edited, taking more necessary time and effort because my goal is not just thought gathering but communication with you. If I am true to form, I may come back later and make further corrections.

Organizing and understanding a J program is the same way for me. If my goal is to do a quick prototype program, I am am less likely to take the time to do the extra work that contributes clarity. The difference for J programming in this analogy is, that even at its least refined, J allows me to test my ideas against a machine, which is not something most forms of expression allow.

I think that other "good parts" of J are the Labs which are an easily accessible interactive tutorial and the support online documents/books such as "Learning J" and "J for C Programmers" that are accessible from the jsoftware website. http://www.jsoftware.com/jwiki/Guides/Getting%20Started

I think that this is a discussion within the J community that will and should go on for a long time. I encourage anyone who would like to change the way that they think about programming to take a look at J and investigate the "good parts" while experiencing the almost inevitable confusion that occurs from exploring a new paradigm in programming. If you would like to see the conversation evolving on the J forums. http://jsoftware.com/pipermail/programming/2014-January/034505.html

like image 97
bob Avatar answered May 16 '23 07:05

bob