A Theory for Language Design

No amount of language design can force a programmer to write clear programs. If the programmer’s conception of the problem is badly organized, then his programs will also be badly organized. The extent to which a programming language can help a programmer to organize his problem is precisely the extent to which it provides features appropriate to his problem domain. The emphasis should not be on eliminating “bad” language constructs, but on discovering or inventing helpful ones.

— AIM-353: LAMBDA: The Ultimate Imperative

Finding the real problem

The poster of this thread on the PLT discussion list wondered why Scheme code is so much slower than Python. It was interesting to see how the question was answered because there were at least 3 levels to the problem:

  1. The source code to the solution itself
  2. How the source code worked “under the covers” (it called into C functions)
  3. An implementation in Scheme similar to how Python worked under the covers

Finding an explanation didn’t just involve comparing the code, it required understanding that the Python code actually called into C functions, and then converting the Scheme code into a similar “stateful” style of program. In programming, thinking is required!

Computers are a metamedium

The computer is a medium that can dynamically simulate the details of any other medium, including media that cannot exist physically. It is not a tool, although it can act like many tools. The computer is the first metamedium, and as such it has degrees of freedom for representation and expression never before encountered and as yet barely investigated. The protean nature of the computer is such that it can act like a machine or like a language to be shaped and exploited.

— Alan Kay
I’ve never before heard it put quite so well.
(via R.P. James)

Make no small plans

Make no little plans. They have no magic to stir men’s blood and probably themselves will not be realized. Make big plans; aim high in hope and work, remembering that a noble, logical diagram once recorded will never die, but long after we are gone will be a living thing, asserting itself with ever-growing insistency. Remember that our sons and grandsons are going to do things that would stagger us. Let your watchword be order and your beacon beauty. Think big.

— Daniel Burnham, Chicago architect. (1864-1912)

A Prodigious Error Message

For my BarCampMadison2 presentation this year, I prepared a DVD “gift bag” with a lot of material on Functional Programming (FP) and specific FP languages like Scheme and Haskell, and also included DrScheme binaries for Mac and Windows and source for UNIX.
Yesterday I received an email from one of the attendees. He was copying the contents of the DVD to a directory on his UNIX system. In the course of doing so, he got an error message. If you are even superficially familiar with Monads and Haskell (as I am), you will surely find this error message prodigious!

/mnt/cdrom$ cp -R library ~/lisp-library
cp: cannot access `library/Haskell/Monads': Input/output error