Let’s suppose your unimaginative instructor gave you this task: add up all the whole numbers from 1 through 42.
You have, of course, several options:
- You could do it by hand—tedious, slow, and error-prone, but it could get you there.
- You could use a spreadsheet—possibly still tedious, but pretty quick if you know what you’re doing.
- You could look for certain patterns that invite a shortcut, especially if you’ve studied arithmetic series.
- You could write a computer program in the language of your choice—a fairly quick loop if you’ve done tasks like this before, though you open yourself up to a fencepost (off-by-one) error.
Or, if your language of choice is APL, you could simply write a one-line program consisting of only 5 characters! Here it is:
+/ι42
That third character is the Greek letter iota, so the (very small) price you pay for the elegance of APL is learning some new characters. Much more important is that you learn some new ways to think. Rodrigo Girão Serrão quotes Alan Perlis as saying “If a language is worth knowing, it affects the way you think.” Without context you can’t tell whether he’s talking about human languages or computer programming languages; it’s actually the latter, but the fascinating point is that it works for both! As for human languages, even learning a closely related one like German definitely affects how you think (which sounds Whorfian, but it’s much less extreme than Whorf). And the farther you move from English, the more that is so, whether it’s French or Greek or Hebrew or Mandarin—in increasing order of distance from English—each of which has its own effect.
“But what is APL?”, I hear you ask, returning to the subject of computer programming languages. Well, APL is a programming language, of course. Why that odd name? Well, let me make a small change in the second sentence of this paragraph: APL is A Programming Language. Get it?
Here’s an excerpt from a post I wrote on June 5, 2019:
One year at Lincoln-Sudbury, when I was teaching Algebra II Honors along with my friends Alison Birch and Phil Lewis, we decided to incorporate APL into the course. (I’m always seeking to incorporate programming into my math classes, usually with less success than I had hoped.) We chose this because APL is a programming language with a strongly algebraic bent, including the ability to work with vectors and iteration in very simple ways. Unfortunately the strange symbols made it too daunting for too many students.
BTW, one student told me at the end of the course that he had just realized the reason it was called APL was that it is A Programming Language; he had thought all along that it stood for Alison, Phil, and Larry!
Many thanks to my eponymous friend and colleague, Alison Birch, for recommending Serrão’s article! Read it now before you forget, especially if your only programming experience is with a conventional language.
Categories: Linguistics, Teaching & Learning, Technology