Positivist Programming

2013/08/03 writing-not-by-me

Author: Stephen Bond

As anyone working in software can tell you, computer programs suck. They're full of bugs, they're unreadable, unmaintainable, and inflexible, and they require a huge support structure to keep working. Furthermore, the knowledge they contain is obscure and esoteric, jealously guarded by a priesthood of programming nerds, most of whom don't even comprehend what they are guarding. A great deal of research in computer science and software engineering is devoted to solving these very problems, and some researchers — I was one of them, for a while — are convinced they know the answer. They think computer programs suck because they're written in procedural languages; the solution, they say, is to write them in declarative languages.

The Declarative Dream

Procedural languages encode sequences of instructions, known as procedures or algorithms, which tell the computer how to perform specific tasks. Algorithms are long, boring, complicated, difficult to explain and difficult to read, and as a result are typically full of errors. They're also good for only one thing: if you want the computer to do a new task, you need a write a new algorithm for it. Any really useful procedural program, such as a Web browser, consists of a mass of intricately interconnected algorithms, working together in delicate balance; the slightest touch can make the whole thing fall apart. Procedural programs like this are typically so complex that even when their source code is published, only a handful of nerds will ever bother to understand them.

Declarative programs, by contrast, are concise, comprehensible and easy to modify. This is because declarative languages are used to declare simple facts. A declarative program is a collection of facts, which are true statements about the problem it should solve. As an added bonus, these facts will necessarily give the computer enough information to solve other problems, too. Having read and understood the facts in a declarative program, a computer will be able to do any relevant and feasible task you ask of it. A declarative program contains the souls of a million algorithms; it's deceptively deep and nuanced.

In truth, it barely makes sense to refer to a declarative program as a "program" at all: it's more like a world of possibility. A fully declarative Web browser, if such a thing existed, would not just be a browser. It would also be an editor, a news feed and an incredibly powerful search engine, allowing you to experience and share the content of the Web in ways never before devised. It would be a true Artifical Intelligence, capable of answering almost any Web query you could imagine, and presenting the answer in almost any way you wished. Its power would be limited only by the factual detail of its underlying declarative knowledge, and the theoretical limits of computation.

Sounds pretty good, doesn't it? Indeed, it sounds positively utopian. And because the declarative utopia does away with the priesthood of software nerds who stand in the way of progress, it has great appeal for both technocrats and proponents of democracy. Technocrats love declarative languages because they let the real experts put their knowledge directly to work in a computer; democrats love them because they promise computing power to the people and AI for the masses.

And yet, despite being with us now for decades, declarative languages have failed to enter widespread use, and with few exceptions are confined to the obscure corners of computer science academia. The computer programs people use today, the programs written in the industrial sweatshops and software cults and bedsits of the world, are overwhelmingly written in procedural languages, and there's no sign of that changing. For this state of affairs, declarative advocates blame entrenched political powers: the software industry with its cautious, short-term profiteering, and its supporting education system which pumps out graduates trained in Java and C# and PHP and fuck all else.

For a long time I accepted this explanation at face value. But to gain a better understanding of why declarative programming failed, it helps to look at its history. Let's begin with the granddaddy of almost all today's declarative languages: a formal mathematical language known as Predicate Logic.

The Great Men of Predicate Logic, Part 1

Most students of Predicate Logic learn the Great Man version of its history. We learn of a series of giants clambering upon each other's shoulders, Great Men building on each other's Great Ideas, Great Ideas which shine with inner light and endure through inner strength. And it's widely agreed that the first of these Great Men, the inventor of Predicate Logic, was Gottlob Frege, a German philosopher who was active in the late 19th century.

Frege was the kind of crusty pedant who gives philosophers a bad name: while his contemporaries were debating with each other about the meaning of existence, Frege was debating with himself about the meaning of meaning. A stickler for formality, he wanted to give his semantic arguments an air of mathematical rigour, and to this end he developed a "calculus of argumentation", an early version of what we now call Predicate Logic. Frege wasn't the first person to develop a mathematical formulation of logic; alternatives were around, but they were of limited use in capturing the meaning of real-world arguments. Frege's language was expressive enough to capture the kind of sweeping categorical statements you might find in a philosophy tract. You could even, in theory, use it to make sweeping political statements — though thankfully Frege, who was a bitter anti-semite and opponent of social democracy, and in his later life one of Hitler's early adopters, chose not to.

Today, Frege is often called "the father of analytic philosophy", but his reputation as the pedant patriarch took a long time to get established. An introverted no-name from a provincial university, he was obscure in his day and remained so for decades afterwards. His repeated name-checking in histories of declarative programming is one of the distorting effects of the Great Man view of history. In our story, Frege is something of an odd man out: a political reactionary whose work might well have been forgotten if it hadn't been stumbled upon by a well-connected bunch of progressives.


The progressives in question were followers of a philosophy known as Positivism, which was one of the dominant philosophical trends in Europe in the late 19th and early 20th century. This was the age of the "New Imperialism", the "Scramble for Africa", and the "Second Industrial Revolution". In their rush to exploit the world's resources for their own benefit, European empires had become strained by great internal and external tensions. New social classes were finding a power base: workers, industrialists, technocrats, disaffected ethnic groups. And although the popular revolutions of 1848 and 1857 and 1871 had failed, it was clear that the old social ties were not long for this world. King and faith and duty had become outmoded and discredited, unable to meet the demands of a changing world. Positivists sought to replace these old certainties with new ones.

Positivists wanted to place reason and empirical observation at the foundations of human knowledge, and therefore at the foundations of power. They dreamed of a world in which the mystical and metaphysical justifications for power were swept away, and society was organised along rational, empirical lines. Their dreams were inspired by the successes of natural philosophy, and its metaphors of progress and universality. Indeed, the Positivists were largely responsible for turning "natural philosophy" into "science" as we understand it today: a distinct discipline with its own methods and standards, accountable only to itself. In the Positivist worldview, scientists and engineers were the new heroes, whose works and methods would inspire progress towards a better society.

Like declarative programming today, Positivism had strong appeal for both democrats and technocrats. Democrats loved it because it promised to put knowledge in the public domain. The old foundations of knowledge — religious revelations, moral tenets, dreary works of Latin and Ancient Greek, metaphysical ramblings, tribal traditions, secret deals and treaties — were esoteric, culturally-specific, carefully guarded by a privileged few. The new foundations, by contrast, were freely accessible to anyone with eyes and a brain. In the progressive Positivist utopia, knowledge would be founded on objective facts, evidence, reason, and the scientific method.

Technocrats loved Positivism because it justified rule by an intellectual elite. Progress would be dictated by those people who best mastered the facts, evidence and reason — and all the facts, evidence and reason suggested that those people were educated white male Europeans. That these were the guys already in charge was simply an added bonus, which instilled Positivists with the confidence that European civilization was on the right track.

Positivism, and its principal thought current, Social Darwinism, gave late 19th-century European liberals a convenient justification for the crimes being committed in their name. Social Darwinists saw European imperialism not as plunder, murder and torture, but as a healthy natural process: natural selection played out on the political stage. They only had to look at the evidence before their eyes to see that European civilization was the world's most advanced: and since evolution favoured the survival of the fittest, it was only natural that the savage should fall before the white man's civilizing mission. To interfere with this process would not just be a violation of nature's laws, it would also be profoundly reactionary, a crime against capital-P Progress.

The better Positivists did not fall in line with Social Darwinism. They got the sense that the Social Darwinists were abusing language in some way, and that the democratic ideals of Positivist thought were being twisted to technocratic and reactionary ends. Their solution was to take Positivism back to basics. Once it had a secure hold on the fundamentals of knowledge, they hoped, Positivism could be relaunched in an unequivocally egalitarian guise.

The Great Men Of Predicate Logic, Part 2

One of the most influential of these radical Positivists was a British philosopher called Bertrand Russell. Born into an aristocratic family of big-name liberals, Russell spent his childhood in the company of some of the foremost utilitarian thinkers, hand-wringers and moralists of his day. Groomed and primed from an early age to be an intellectual superstar, he fulfilled this destiny in 1910 by publishing, along with his less famous collaborator Alfred North Whitehead, a book titled Principia Mathematica.

Principia Mathematica was a monumental three-volume work on the logical foundations of mathematics; it attempted to establish, by thorough, rigorous logical argument, the fact that one and one are two. In doing this it made extensive use of a formal language uncannily similar to Frege's logic, which Russell had probably come up with on his own. One of Russell's early reviewers happened to pick up on this resemblance, obliging Russell to acknowledge Frege's priority — and thus the legend of "the father of analytic philosophy" was born.

Thanks to Russell's fame, Principia Mathematica received wide exposure, and its use of what is now known as Predicate Logic suggested an exciting new direction for Positivist thought. Russell's ideas received a further boost when they were taken up, extended and critiqued by one of his students, an Austrian rich kid called Ludwig Wittgenstein. Wittgenstein had a family background that made even Russell look like a pauper. The reluctant scion of a domineering steel tycoon, one of the wealthiest men in Europe, Wittgenstein spent his childhood hob-nobbing with the highest of imperial Viennese high society — and society doesn't get much higher than that. Groomed from an early age to take over his father's industrial empire, Wittgenstein instead fucked off to England at the earliest opportunity, to devote his life to the study of the most uncommercial and practically useless subject he could find. Russell proved an ideal mentor, and Predicate Logic an ideal subject.

The key work of Wittgenstein's early years is a slim 1921 volume called Tractatus Logico-Philosophicus, which used Predicate Logic to study language, meaning and the limits of expression. In terse phrases, Wittgenstein set out his core beliefs:

Rousing words; Wittgenstein's Tractatus at times reads like the original manifesto for declarative programming. But before that, it became the manifesto for a new movement called Logical Positivism.

Logical Positivism

Logical Positivism was Positivism's response to the catastrophic aftermath of World War I. For the first time in centuries, European civilization looked weak and shaken. The old hierarchies and certainties suddenly and rapidly collapsed; monarchies fell, aristocracies were purged, empires fragmented, revolution was in the air. Pent-up social tensions exploded, and everywhere people ran to take sides. In the urgent battle for a new social order, positions became more entrenched and more polarised. Logical Positivists were the new Positivists: angrier, more radical, and more evangelical. The language in some of their philosophical tracts bordered at times on intemperate.

The Logical Positivists rallied to Wittgenstein's manifesto and gathered in his home city of Vienna (although Wittgenstein himself wanted nothing to do with them — his philosophical views were changing, as we shall see). A city of extremes, interwar Vienna was a fitting birthplace for this most extreme form of Positivism. A phoenix from the flames of the most shattered European empire, Vienna embodied Europe's worst despair and best hope. The most backward empire in Western Europe had yielded its most forward-thinking government. The Social Democrats of "Red Vienna", with their progressive tax regime and social housing programme, pointed to a new egalitarian future; while around them and in their midst, reactionary forces plotted to restore the old ways.

The Logical Positivists of the "Vienna Circle" saw themselves as a central force in the defence of progress against reaction. They were confident they would succeed where the old Positivists had failed, because they had a new, sophisticated tool at their disposal: Predicate Logic. Predicate Logic would build the new rational foundations of power and knowledge, and because this language was mathematically precise and meaningful and unambiguous, the new foundations could not be warped or controlled by malign forces. The new hierarchy of knowledge would be a truly universal hierarchy; no one group could claim any part of it for its own. Knowledge would be for all people, for all time.

But despite their strident tone and confident aspirations, the Logical Positivists went nowhere fast. They quickly became hung up on the problem of "verificationism": how do you verify that a sentence corresponds to a fact about the world? Even facts themselves proved slippery: a fact was a true relation between individual objects, but it was hard to say what an object was, let alone a relation. Following the arguments of Logical Positivism down one path or another led to weird and intractable paradoxes. Notably, the most significant and lasting result to come from the Vienna Circle was negative. Kurt Goedel, a junior member of the circle, proved that Russell's work in Principia Mathematica was incorrect and a waste of time: you couldn't give mathematics a rigorous foundation in Predicate Logic, or any system like it.

While the Logical Positivists dithered and turned up blanks, history was rapidly passing them by. Their obsession with facts and precise language and truth was no defence against the reactionary political powers on the rise in Europe, who were of the opinion that facts were malleable, precise language could be used for whatever ends they desired, and the truth was whatever they decided it to be. Furthermore, the old-style technocrat Positivists were thriving under these fascist and totalitarian regimes, and the rational, scientific approach they brought to oppression, mass murder and genocide seemed to tarnish the whole Positivist project. The new hierarchies of power and knowledge they helped build seemed even worse than the old, and the new certainties they offered far less comforting. And after World War 2, the Holocaust, Hiroshima and the Gulags, many people started to think that hierarchies and certainties were not such desirable things after all.

The Death And Resurrection Of Positivism

By the outbreak of the Cold War, "Positivism" had become a dirty word among the more democratically-minded philosophers. This was a potential problem for the Cold War superpower which styled itself the champion of democracy, the United States of America. Positivists were openly working at the heart of US government; odious technocrats like John von Neumann, Edward Teller and the paid-up Nazi Wernher von Braun were central figures in the US struggle for global hegemony. A market niche was open for any Great Man willing to justify the democratic credentials of these anti-democratic creeps, and it was soon filled by an obscure philosopher from the distant fringes of the Vienna Circle.

Karl Popper was born into an upper-middle class family in Vienna in 1902, and like many rich kids today, had a brief flirtation with radical politics in his youth. He did some volunteer work, attended political rallies, hung around at Vienna Circle meetings, that sort of thing. But by his late twenties he had settled down into career academia, and from then on his views became steadily more conservative. Like his good friend Friedrich Hayek, Popper became deeply concerned with defending classical liberalism, and with it his lifestyle and bank balance, against threats from the left and right. His main gripe with Positivism was that it was that it tended to spin either too democratic or too technocratic; his solution was to propose a new kind of Positivism — later called "Postpositivism" — which was a happy medium between the two extremes.

Postpositivists didn't deal in verifiable facts, but in falsifiable statements, which until someone proved them wrong were as good as the same thing. Postpositivists didn't reveal absolute truth, but approached asymptotically close to it, as near as made no difference. Postpositivists were only authorities until someone proved themselves better authorities, by their own criteria; these could only be other Postpositivists. Postpostivists were technocrats with a durable outdoor gloss of democracy; in other words, they were liberals.

Popper outlined these ideas in his 1934 work The Nature of Scientific Discovery, which received no attention whatsoever at the time, much to his annoyance. A prickly, arrogant character, isolated from his philosopher peers, Popper saw his career falter, and by 1945 he was working in bitter obscurity in New Zealand. He was rescued by his friend Hayek, who by the same time had manoeuvred his way into a high-profile position at the London School of Economics. Hayek prospered through the simple device of telling the ruling classes exactly what they wanted to hear, and he recognised that the ruling classes would very much like to hear Popper's message too. He helped find Popper a publisher in England, and then a position at the LSE. It wasn't long before Popper became the leading philosopher of Cold War liberalism, and Postpositivism the officially-approved philosophy of science throughout the Western world.

Popper modestly regarded himself as the destroyer of Positivism, but in truth he functioned as its temporary redeemer. He gave Positivists a conjuring trick that let them behave exactly as before, to the same ends, while avoiding all the stigma. As Postpositivists, scientists and engineers could go about their business undisturbed, and the technocratic elite could work with a clear conscience.

But today, as totalitarianism and its memory recede into history, technocrats feel less inclined to apologise for their Positivism or employ the Popperian defence. Only the most philosophically and politically aware scientists these days bother to describe themselves as Postpositivists. The less aware scientists, like Richard Dawkins, appear to think Postpositivism is a type of New Age psychadelia.

Despite Popper's blustering claims to the contrary, Positivism never died. Most scientists are still Positivists in all but name. They barely question the old Positivist assumptions: the attainability of objective truth, the value of empiricism, the universality of scientific knowledge and the scientific method. Many scientists are not even aware that these are assumptions. It's very possible to complete a higher science degree and become thoroughly programmed in Positivist thinking, without being aware of the existence of Positivism, or its history.

All the most extreme forms of Positivism are still alive and well. Hardcore evangelical Positivism is known today as "Skepticism" or "New Atheism" and is very popular among nerds. Social Darwinism has stuck around under the names of "Evolutionary Psychology" and "Sociobiology", and is still used to advance the same old racist, sexist, imperialist ideas. Logical Positivism is also still around, though it's now called "Declarative Programming" and has a very different character.

Positivist Programming

Even as Logical Positivism lay dying as a formal movement, its ideas found a lifeline in the emerging world of computer science. Many researchers in this new field felt that Predicate Logic was the obvious model that all computer languages should aspire to. For one thing, it offered a mathematically precise way to represent and reason with knowledge; for another, it bore the imprimatur of a dozen Great Men, and what scientist wouldn't want to climb on their shoulders?

An elect group of computer scientists began their climb to greatness by developing automated reasoning systems for Predicate Logic. Later, as computer systems became more powerful, they developed "declarative" computer languages, which imitated Predicate Logic itself. Like the Logical Positivists, these researchers wanted to use Predicate Logic to build worlds of facts and reason. But they were not particularly interested in the democratic ideals of the original Logical Positivists; they didn't want to build the foundations of knowledge for all humanity. Instead, they wanted to build the foundations for a machine superintelligence.

Computers, after all, were machines literally built on logic. They had a perfect recall for facts, and could reason with a speed and accuracy far in excess of any human mind. In possession of all the right facts, a computer would be an infallible expert, the arbiter of everything, the ultimate technocrat. And in an age when nuclear weapons were poised to obliterate humanity at the flick of a switch, you really wanted the ultimate technocrat on your side.

Cold War funding poured in for "Artificial Intelligence" research, and in the early decades it seemed to advance with startling rapidity. Even running on the primitive punch-card machinery of the 50s and 60s, computer programs were able to prove complex and difficult logical theorems. Researchers were churning out surprisingly capable language parsers, reasoning systems, chess players, and even a program that did a passable imitation of a psychiatrist. It seemed like an all-knowing, all-seeing AI was just around the corner. Senior researchers began to think of it as an almost trivial problem, one student research project away.

And then in 1970 that student research project came to fruition. SHRDLU was an Artificial Intelligence demo by a guy called Terry Winograd, who at the time was a doctoral student at MIT. At the heart of SHRDLU was a declarative description of a "blocks world", written in a Predicate-Logic-inspired language called Planner. The "blocks world" was a virtual box containing blocks of different shapes and sizes, and SHRDLU was its absolute master. Through a language parser interface, you could ask SHRDLU to perform almost any task in this virtual world. It could manipulate and stack the blocks, build and learn about new structures, solve puzzles, and reason with total accuracy about hypothetical futures. Within its domain, SHRDLU was both omnipotent and omniscient. It was an almost frightening indication of what declarative programming could achieve. A machine superintelligence was simply a matter of scaling up.

But declarative programming never scaled up; the sad truth is that SHRDLU is still the state of the art. A number of powerful and expressive declarative languages came along in the wake of SHRDLU, Prolog chief among them, but to this day they're rarely used for projects more ambitious than blocks world. The wider quest for machine superintelligence never progressed much further in the decades after SHRDLU; as computing hardware grew exponentially in power, AI stayed more or less still. Its promises rang more and more hollow, and funding eventually dried up.

As a research field, AI has been forced to adapt and lower its ambitions. No serious AI researchers today are trying to build an omniscient computer. Instead, their only aim is to make computers perform as well as or better than humans in a limited range of specific tasks. And they've had by far the most success with non-representational statistical techniques like machine learning and data mining. Declarative programming has been increasingly pushed into the margins even of its home territory.

Declarative programming failed because it ran into all the old Positivist problems. Indeed, I think the wider failures of Positivism become very clear when viewed through its lens.

Declarative Programming Doesn't Scale Up

A cardinal rule of engineering is that whenever you hear someone talk about "simply scaling up", you should run a mile. Scaling up is almost never simple; scaling up introduces countless difficulties that were never imagined in the scale model. And when it comes to scaling up a program like SHRDLU, declarative languages are simply inadequate to the task. Using them to build an omniscient AI is like trying to build the universe with the tools and materials for building a doll's house.

Declarative programming works wonders in toy environments, but once your environment becomes appreciably larger than a chessboard, complexity starts to pile on. Your program's domain is supposed to be built of facts, but as the domain increases in size it becomes very difficult to say what those facts are, which of them you really need to express, how to make sure you express them, and how to avoid expressing something incorrect or unintended. The merest slip on any of these fronts can have severe consequences, transforming your program from a wise oracle into a broken-down dunce.

These issues are collectively part of the "Frame Problem", the greatest unsolved problem in declarative programming. It's a problem that blights every attempt at a large-scale declarative program, and a problem that refuses to disappear, despite the many ad hoc attempts to explain it away. No one can say precisely what facts a domain is made of, and no one has any idea of how to begin coming up with an answer.

By ignoring facts and concentrating on getting things done, procedural programs tend to skip around the Frame Problem. They too have come nowhere near making an omniscient AI, but unlike declarative programs they have found useful applications in the real world. Procedural programmers might never build much more than rickety shacks, but rickety shacks still keep the rain out. Declarative programmers, by contrast, have spent the last fifty years trying and failing to build skyscrapers out of balsa wood.

It's often unacknowledged, but the Frame Problem also applies to Positivist methods in the wider world. People who offer technocratic solutions to social and political problems (proponents of "rational" charities, for example, and neoliberals in general) almost always base them on an inadequate and misleading bunch of facts. They've no idea what facts they're missing, or how to complete the picture, or even if the picture can be completed with the methods they have available. And when their solutions inevitably fail, the cost is far greater than a broken-down computer program. Thanks to failed Positivist models of social and political interaction, countless human victims have suffered and continue to suffer.

Declarative Programming Is Unintuitive

Declarative languages are supposed to offer a more intuitive and natural way of computer programming, and yet it's fair to say that the vast majority of programmers can't get their heads around them. Their advocates claim that this is because procedural programmers are too steeped in algorithms to adapt to a new paradigm, and there is something to this argument. But I think there's something more to the argument that declarative languages are nowhere near as intuitive as their advocates make them out to be.

Except in rare cases, declarative programming doesn't reflect the way people experience the world or attach meaning to language. People don't decompose the world into objects and relations and facts; people don't reason towards goals; people don't deduce, induce or abduce; people don't evaluate propositions by checking if their negation is compatible with their existing belief set. People don't represent; they do. This is why procedural languages offer a more satisfying experience to beginning programmers: you use them to do stuff.

The concept of meaning which underlies declarative programming — which is to say, that of Logical Positivism — is extremely limited, and utterly fails to capture the way people communicate and interpret meaning in the real world. It's only relevant in the rare instances where people talk about abstract ideals rather than practicalities, and want to nail them down as precisely as they can — a use which isn't much called for outside of science textbooks, philosophy tracts, and simple games. When you want to build a machine that can navigate in the human world — hell, if you want to build a human who can navigate in the human world — Logical Positivism just won't do.

Even some of the Great Men in our story came to feel the same way. After failing to take SHRDLU any further, its creator Terry Winograd turned against the Positivist ideals behind AI, and apparently to this day teaches Heidegger as an alternative, which is hardly an improvement. And the guy who wrote the original manifesto for Logical Positivism, Ludwig Wittgenstein, spent the second half of his life dismantling its ideas and coming up with better alternatives.

As far as I understand it, the basic idea of the born-again Wittgenstein is that meaning exists in social context. Words don't have definitions; words have uses. They don't denote precise sets of objects, but are instead used to activate networks of family resemblances which people have learned and built over their lifetime. In conversation, meaning is negotiated along mutually understood rules. Communication is at the centre of meaning, and communication is about shared history, context, sympathy, imagination, accommodation, imitation, and negotiation.

Wittgenstein's new ideas provided much better insight into how humans attach meaning to language; and when I say "humans" here I'm not referring to those who have internalised the ideals of Positivism. In conversation, Positivists tend to come across more like robots, whether they're applying reasoning heuristics in places they don't belong, cracking out dictionary definitions to settle an argument, or displaying an extreme of literalism that would put a bible-thumper to shame.

Positivist ideas of meaning cause serious problems when applied in a political context. Rather than negotiate or engage in dialogue with their opposition, Positivists prefer to impose their own version of "truth", which inevitably suits themselves. They prefer to deal in absolutes where there are none; they deal in objects and goals and evidence where there are beings and feelings and experiences; they are inflexible, they're unwilling to adapt to context, and they leave a trail of destruction wherever they go.

Declarative Programs Are Not Declarative

In practice, there is no truly declarative computer language; every one of them is demeaned by its computer implementation. Computers are machines which process instructions in sequence, and every declarative program running on a computer has to do that too. Every declarative program has a bunch of secret algorithms running in the background, custom-built to carry out a user's declarative queries.

For those outside the loop, these secret algorithms make declarative programming even more unintuitive than it otherwise would be. As an example: if you take two different but equivalent sentences of Predicate Logic — two sentences that have exactly the same meaning — the chances are that they will have entirely different computational properties when adapted to run in a declarative programming system. One will probably make your program slow, and the other will make it a million times slower.

In practice, the few people who actually use declarative programming languages end up hacking together their fastest programs based on inside knowledge of the workings of the system — a system they've probably written themselves. These programs are every bit as extemporised, impenetrable and esoteric as the worst procedural code. (And they're not even a tenth as fast.) If declarative programming ever caught on, then its current practitioners would simply become a new programming priesthood, new guardians of sacred knowledge, another obstacle in the way of progress.

The democratic ideals of declarative programming are ultimately just as delusional as the democratic ideals of Positivism. Positivism is an inherently technocratic world view; it forces the values of an educated Western elite on a world that works rather differently. Far from being new universals, these values are new marks of distinction, and a code by which one member of the elite can recognise another.

PoMo Programming

Declarative languages are not entirely unused outside academia; they have found a practical application in niche areas like scheduling and verification. The relational databases that sit at the backend of every bank account and second-generation website could also be considered primitive declarative programs, even though the data in them is usually manipulated with procedural code. Positivism has its practical relevance too, in its own limited domain of the hard sciences. There are times when it suffices to talk about just the facts and evidence and reason. These times just don't happen very often, which is why the intellectual vogue has moved on from Positivism.

I often wonder what hard science would look like if it too had moved on from Positivism. Could we imagine a science that was truly in the spirit of the contemporary cultural zeitgeist? What would science be if it were hip and with the times? What, in short, would a Postmodern science look like?

I think a good example of Pomo science has been in my peripheral vision all these years: computer science. Not the forgotten backwater I was involved in, not the formal, fundamental stuff. I'm talking about mainstream CS, the computer science of procedural programmers trying to solve problems and get things done.

Procedural programming is a science in the sense that it's about organising knowledge in a rational and mathematical way, with predictable and repeatable results. But it also has many of the hallmarks of Postmodernity. It has little universal theory or overarching narrative. It has little formal relation to observable reality or empirical evidence. Its influences are eclectic, taken at whim from a variety of other disciplines: mathematics, psychology, philosophy, biology, physics, management science. It doesn't commit to a central truth: it commits only to whatever works.

A procedural program is not, in general, an experiment to test a hypothesis. It's less concerned with what it means than what it does. It's not a representation, but a simulation; it doesn't model reality, it creates its own. "Knowledge" in a procedural program is a rather elusive concept, and "truth" is no more than a boolean value.

Procedural programming also suffers from the downsides of the Postmodern condition, chief of which is its prostration before profit. Its advances are mostly driven by industry and the bottom line. Its best research is often proprietary, its knowledge is shallow, mystified, fragmented, and contradictory, and its use of resources is wasteful.

But depressing as the Postmodern condition can be, if Positivism is the only alternative, then give me Pomo every time. Positivism might style itself as "progress", but it's really a giant step backwards. There's got to be a better way out of the present quagmire than clinging to the values of 19th century imperialism — the values that got us here in the first place.