5 ms·
The reason people can't read APL easily is it's one of many languages programmers know. If APL was the ONLY programming language any ever used anywhere, then al
by vorg 16y ago
The reason people can't read APL easily is it's one of many languages programmers know. If APL was the ONLY programming language any ever used anywhere, then all programmers would be able to read it easily after a little programming experience. Natural languages have the tersest syntax around, and people understand them easily because it's the ONLY language they learn, or one of only a handful if they're polylingual. It would be the same with a programming language.
- tkahn6 16y agoJust because you understand a language does not mean you understand or recognize all algorithms that can be expressed in that language.
- silentbicycle 16y agoYeah, but that's hardly limited to APL.
- tkahn6 16y agoThat's why I said 'language' and not 'APL'.
- lukev 16y agoNot really... The syntax of natural languages isn't really comparable with programming languages. Completely different modes of understanding. Calling programming languages "languages" is only an analogy. Humans have highly evolved linguistic capabilities that don't really apply to programming languages (though if you could invent one that leveraged natural language capability, you might have something very interesting on your hands.)
- gruseom 16y agoVorg is simply saying -- and is quite right -- that APL is regarded as unreadable only because it's unfamiliar. People who know APL-based languages are amazingly proficient with them. The "write-only" slur is a canard. (Actually, these languages constitute one of the truly great contributions to programming. APL belongs on a short list with Lisp, Smalltalk, C, Forth, and very few others.) It's depressing how the computing world is overrun with majoritarian prejudice. Even here. I suppose it's just human nature, but an open mind is so rare.
- lukev 16y agoI do hope I don't fall into that camp. I learned programming in BASIC, moved on to game development in C/C++ and DirectX, programmed professionally in Java for 6 years, learned Scheme, learned Clojure, wrote a book on Clojure, am now learning Haskell... But I was motivated to do all of that because of people I respected who said "This contains some genuinely new ideas worth learning." So far, I haven't heard anyone say that about APL, and so I guess I assumed that either its differentiation was only in a hyper-terse syntax, or that it was not generally suitable for a generalized programming language (similar to regex). If that's an invalid assumption, then please point me towards an article elucidating what's great about APL, and I'll read it sincerely.
- silentbicycle 16y agoAPL contains some genuinely new ideas worth learning. I'd suggest looking into J, as a more accessible and modern APL dialect. (K / Q is also really, really cool, but J is less commercially restricted.) I was just curious because it was so different, but the thing that really convinced me was going through some of the J "labs" (a bunch of math lessons included with J, that incidentally teach it along the way) and spending a couple hours picking apart this code (http://nsl.com/papers/origins.htm http://nsl.com/papers/origins.htm) to get into the APL frame of mind. I would suggest not getting too hung up on the syntax, and instead focusing on the pros and cons of doing everything over collections by default, with implicit looping. "Thinking big", as Henry Rich calls it in _J for C Programmers_ (also a good resource). The ideogram-based syntax is an historical thing, and getting fixated on that is like thinking the only novel thing about Lisp is all the parens. See also: "The World's Most Mind-Bending Language Has the Best Development Environment" (http://prog21.dadgum.com/48.html http://prog21.dadgum.com/48.html)
- gruseom 16y agoOh, then I think you'd find a lot to like about APL/J/K. It's not just that they contain genuinely new ideas worth learning; they're mindblowing in the way that Lisp and Forth are. I agree with silentbicycle that your best bet is probably the tutorials that ship with J (http://www.jsoftware.com/start.htm http://www.jsoftware.com/start.htm). The closest thing to a manifesto is Iverson's Turing award lecture Notation as a Tool of Thought (http://www.jsoftware.com/papers/tot.htm http://www.jsoftware.com/papers/tot.htm). But the really hardcore, beyond mindblowing stuff is Arthur Whitney's work on K, Q, and kdb. (Edit: the Q book is available online at https://code.kx.com/trac/wiki/QforMortals2/contents https://code.kx.com/trac/wiki/QforMortals2/contents, user and pwd "anonymous").