The J programming language, an array-oriented functional language similar to APL, has been generating discussion in programming communities recently, particularly due to its unique syntax and approach to problem-solving. A recent article introduction to J sparked conversations about both the language's peculiarities and a recurring issue with submission titles being truncated on sharing platforms.
Title Truncation Issues Highlight Submission Problems
The article titled Understanding J appears to have been cut off when shared, leading to several comments about the incomplete title. Community members pointed out that this is a recurring issue with certain submitters who use automated bots to repost content from other sites without checking if titles fit properly. One commenter suggested that abbreviating Understanding J: An introduction to J that gets to the point would have worked perfectly fine, while another noted that the submitter has been posting messed up titles for approximately five years without fixing their bot.
J's Unique Syntax Sparks Curiosity and Confusion
J's distinctive syntax features, particularly its use of underscores for negative numbers (like _3
instead of -3
), caught the attention of several commenters. This unconventional choice stems from J's relationship to APL, which used a special character (¯) for negation. J adopted the underscore as an ASCII-compatible alternative. The language also uses underscores in unique ways for representing infinity (_
) and negative infinity (__
), approaches that reduce the need for exception handling in certain calculations.
I've recently come to be fascinated by J... But it keeps on recurring to me and I pause to think of J at the weirdest times. As I use more and more languages, I've become more fascinated by it.
Key J Language Features
- Array-oriented programming language similar to APL
- Functional language supporting tacit programming (point-free style)
- Unique syntax for representing:
- Negative numbers:
_3
(uses underscore instead of minus sign) - Infinity:
_
(single underscore) - Negative infinity:
__
(double underscore)
- Negative numbers:
- Complex numbers represented as:
2j3
- Adverbs to enhance verbs (functions), including:
/
(Insert)\
(Prefix)*.
(Each)@:
(At)&:
(Under)
Educational Experiences with J Remain Memorable
One particularly interesting thread involved a commenter recalling their experience learning J during their computing degree twenty years ago. Despite finding it confusing at the time and encountering interpreter bugs, they expressed a lingering fascination with the language that has persisted over decades. This sentiment reflects how J's unconventional approach to programming can leave a lasting impression, even when initial exposure is challenging or incomplete.
Array Programming Inspires Language Design Thoughts
The discussion also ventured into language design philosophy, with some commenters contemplating ideal programming paradigms that might combine array programming (like J) with concatenative approaches (like FORTH). This sparked mentions of Uiua, another array-oriented language that might satisfy such requirements, showing how J continues to inspire thinking about programming language design and implementation.
For those interested in trying J without extensive setup, one commenter suggested adding a .devcontainer
directory with a Dockerfile to enable browser-based experimentation through GitHub Codespaces, demonstrating the community's ongoing efforts to make this unusual language more accessible to curious programmers.
Reference: Understanding J