Most things in J are actually two characters, take a look at the Vocabulary (http://www.jsoftware.com/help/dictionary/vocabul.htm)
> I'd like to see some elegant J programs "written out" with some more friendly syntax
The problem with J is that the syntax is highly context sensitive, not the length of identifiers. See here: http://www.jsoftware.com/jwiki/Guides/Language%20FAQ#Guides....
Also, you can use aliases for every word, which are defined in stdlib. You can write "each", "cut" etc. if you want. The reason nobody does that is a little complex.
J is suited for exploratory programming and rapid prototyping. This means that expressive power per character should be as high as possible - and J delivers on this promise. Also the standard J words you can see in the Vocabulary are all there is to J. Everything else is always defined in terms of those and you can't define words with symbolic names, like you can in Haskell, OCaml etc. - so once you know those, you can say you know the language. And as for reading J code, it's meant to be read with the help of the J system: you have at least three possible representation to choose from when viewing J code, and you have ability to evaluate each subexpression to see what it does.
Anyway, J is hard to learn, but after initial hump it's a pleasure to write, and then after a while it becomes possible to read it. In exchange for this difficulty level you get incredible expressive power and performance.
http://www.infoq.com/presentations/j-language
Or, perhaps, this chapter of the (rather dense) "Learning J":
As someone versed in both APL and K/Kona, J's syntax puts me off as well.
APL has a better mental "feeling" for me, more like mathematical symbols. Oftentimes, these are pretty direct.
Want to drop the first element of a vector?
APL: 1 ↓ 1 2 3 4 5
J: 1 }. 1 2 3 4 5
The APL version looks like a drop to me. The J version looks like two characters that I have to remember the meaning of.
I'm sure if I was deeply proficient at J, the two-characters would stand out by their meaning, but it's hard for me to get that far when APL is so much cleaner for me to read.
The language need the aliases to be learnable.
1 drop 1 2 3 4 5 NB. this is how to comment
2 3 4 5 NB. drop is }. in J
Exactly how did it 'flop'? Popularity, or your understanding of it?Math symbols are cryptic, and Math is not popular, but I would not want to write:
"The derivative of x with respect to t" everytime instead of, dx/dt everytime I needed to write a formula.
I am sure beginners find 'for' ambiguous unless they have experience with programming as in 'for i = 1 to 10'. It's syntax you are highlighting, not meaning. People extoll the brevity of Haskell, and other functional languages, because they take the time to understand its syntax. J has been around a lot longer, and was created by some very smart people. I didn't choose it for its job market or popularity, but to expand my mind, and further my mathematics studies.
J's syntax, where everything is a single character, kind of turns me off. Is that incidental or is the syntax essential to the language? (In the case of Lisp, the "weird" syntax isn't incidental but rather essential, since code is data)
If it's incidental, I'd like to see some elegant J programs "written out" with some more friendly syntax.
EDIT: If you want a laugh, download the source for J, and run wc -l .c .h.
http://www.jsoftware.com/source.htm