Cliff L. Biffle’s esoteric programming language HQ9+ is a poke in the eye to programming challenges, but a poke only with a damp rag. As we should be able to do better, I propose the Borges programming language. It is inspired by Jorge Luis Borges’ story “Funes The Memorious”, which concerns a man, Funes, who is incapable of forgetting. He creates his own numbering system:
His first stimulus, I think, was discomfort at the fact that the famous thirty-two gauchos of Uruguayan history should require two signs and two words, in place of a single word and a single sign. He then applied this absurd principle to the other numbers. In place of seven thousand thirteen, he would say (for example) Máximo Pérez; in place of seven thousand fourteen, The Railroad; other numbers were Luis Melián Lafinur, Olimar, sulphur, the reins, the whale, the gas, the cauldron, Napoleon, Agustín de Vedia. In place of five hundred, he would say nine. Each word had a particular sign, a kind of mark; the last in the series were very complicated…
We need not be as arbitrary as that, but the implication should be obvious; every program should be a single keyword. quine prints out the program’s own source code, beer prints out the lyrics to ninety-nine bottles of beer, facebook is facebook.
The standardization effort Borges will require will be immense; perhaps early versions will permit programs to be parameterized with other programs. Besides which we must take care to avoid the difficulties that Funes has, as the necessary dark side of the ability to remember everything is the inability to forget anything:
To think is to forget differences, generalize, make abstractions. In the teeming world of Funes, there were only details, almost immediate in their prescence.
I think Steve Yegge was getting at the same truth in his blog post Code’s Worst Enemy.
Bigger is just something you have to live with in Java. Growth is a fact of life. Java is like a variant of the game of Tetris in which none of the pieces can fill gaps created by the other pieces, so all you can do is pile them up endlessly.
The zap of a line in Tetris; the forgetting of a difference; the generalization of a function; the abstraction of a pattern.
Perhaps Yegge is being a little disingenuous here. All mainstream languages now have a way of allowing a single author to avoid having to write enormous programs – a way to reuse what already exists easily and simply. Using Maven, for example, we can download a staggering quantity of existing libraries, leaving our program to glue them together in new and interesting ways. Take a moment to examine this pom, from a Magnolia CMS module: pom.xml, it is too fearsome to reproduce here.
Look upon its dependencies, its plugins, its exclusions! Each little block of cluttered XML has a meaning dependent partly on Maven, but mostly on whatever is in the repository, addressed by either the block itself or by whatever includes those items the block refers to. And this is what we need! How can we address the dizzying complexity of programming today without offloading huge amounts of meaning to someone and something else? And condensing that meaning into a single token?
Borges programming language?
You’re already using it.