Composition as a Programming Activity


When I started programming, you had four choices on the IBM 370 system that the University of Idaho made available to students: Cobol, Fortran, Basic, and APL. I learned Fortran and Basic, avoided Cobol because it was for "business", and looked on APL with wide-eyed wonder. "Someday," I thought, "when I'm all grown up, I'll learn APL." Well, of course, that day never came (I never grew up and I never learned APL).

I'd kind of thought APL was dead--after all, you don't hear about it much. People refer, jokingly, to APL as a "write-only" language because it's very terse. Recently, however, I discovered that there is a successor to APL with a community of ardent users called "J".

"J" isn't a good name for a programming language in 2006 because its not easily googable. Nevertheless, there is a home for J with freely downloadable versions for Windows, Linux, and OS X. There's a wiki with lots of information, and even a decent tutorial on J by Roger Stokes.

I discovered all this by reading a posting by James Hague at Lambda the Ultimate on a paper entitled The Role of Composition in Computer Programmer. I was intrigued by the title of the paper because I'm always interested in new ways of thinking about the activity of writing programs.

Unfortunately, while I think the paper is tantalizing in its examples, it's written for someone who is an expert in APL (or J). I'm tempted to translate some of it into Scheme so that I understand it, but I'm practical enough to know I won't find the time.

In the meantime, if you're looking for something to challenge your notions about how programming happens, read the classic papers Why Functional Programming Matters. It's written with non-functional programmers in mind and probably won't convince you to be a functional programmer, but it might give you new ideas about how you program.