4 ms·
I guess it's a matter of taste. As someone versed in both APL and K/Kona, J's syntax puts me off as well.
by huehue 12y ago
I guess it's a matter of taste.
As someone versed in both APL and K/Kona, J's syntax puts me off as well.
- Avshalom 12y agoJ suffers vs APL/K. The verb trains; number of verbs vs number of available symbols; variable lengths and semantic baggage we bring to various symbols contribute to a much worse 'line barf problem'. I understand why Iverson went with ascii but frankly I don't even know APL beyond 'advanced calculator' level but every time I look at an APL program it just seems cleaner.
- seanstickle 12y agoThis is my difficulty with J 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.
- klibertp 12y agoThe APL version looks like addition (cons, prepending value to a list) to me. The point being that you have to learn the meaning of symbols anyway, no matter which character set they use. Going for easier input (from the keyboard) and sacrificing a bit of legibility for this is a perfectly fine design trade off to me.
- judk 12y agoOf course APL is cleaner. But it requires a special keyboard. J tried to work around that, and flopped. The language need the aliases to be learnable.
- eggy 12y agoThere are aliases built-in and you can define your own. Drop is built-in. To borrow an example above: 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.