Comment by baruchel
3 years ago
The reason you give (write only programming language) is indeed ONE of the reasons people may give when discussing about array-languages, and it is actually a serious reason to consider. Having spent much time on it as well as on J, I hope not being part of those "only people who never used it or used it briefly" because I would also add another reason, more important to me.
APL emphasizes some "formal external beauty" (of code) over the true beauty of an algorithm. Of course you can do such or such thing in 2½ characters of APL code rather than 60 boring lines of whatever language you want but it is generally full of unneeded hidden loops (or looping uselessly on whole parts of arrays when only a small part is required). Actual complexity of these "elegant" APL solutions is generaly insane.
On the other hand, the J language has a set of some "optimized" idioms -if I remember correctly. Not sure the thing is really better: "write it that way by pretending you are following the array-way-of-life; of course it would be insane to actually do it that way, but my engine will detect the very specific thing you want to do and will use a state-of-the-art algorithm for that purpose". Not sure it is a good thing because the task becomes over complicated: knowing the true (boring) algorithm, knowing the specific array-syntax encoding that algorithm, which falls back to looking in some "list" of what is optimized or not.
While I agree these languages are fascinating to think about computing, learn new things, etc. I finally went to more or less agree with Dijkstra (not the worst reference?) about these languages being "a mistake, carried through to perfection".
What is wrong about writing well commented, well indented, 30 lines of code if I can implement the exact algorithm that way?
> What is wrong about writing well commented, well indented, 30 lines of code if I can implement the exact algorithm that way?
Nothing, it's just interesting and I wish I could do a larger project with one of them outside just playing around.