What might programming become?
February 23, 2013
In 1950 the Bourbaki group of mathematicians (particularly Jean Dieudonné) published an article called “The Architecture of Mathematics” which introduces the motivations behind Bourbaki’s multi-volume work “The Elements of Mathematics.” I’d like to conceive a similar architecture of computing, with a primordial software library of “mother structures” that can combine to efficiently distill any program.
At the center of our universe are found the great types of structures, … they might be called the mother structures … Beyond this first nucleus, appear the structures which might be called multiple structures. They involve two or more of the great mother-structures not in simple juxtaposition (which would not produce anything new) but combined organically by one or more axioms which set up a connection between them… Farther along we come finally to the theories properly called particular. In these the elements of the sets under consideration, which in the general structures have remained entirely indeterminate, obtain a more definitely characterized individuality.
— The Architecture of Mathematics
Programming is a young field and deeply affected by its mercantile allure. Developers create most code without concern for the fundamental patterns and problems involved. The myopic redundancy of this code is a vicious cycle. The new code accommodates faults of the old.
Nothing is more necessary to the culture of the higher sciences, or of the more elevated departments of science, than meditation; and nothing is less suited to meditation than the structure of democratic society. … Everyone is actively in motion: some in quest of power, others of gain. In the midst of this universal tumult - this incessant conflict of jarring interests - this continual stride of men after fortune - where is that calm to be found which is necessary for the deeper combinations of the intellect?
— Alexis de Tocqueville, Democracy in America
In particular the requirements to cobble shoddy software are quite meager. Most devs are ignorant, especially of math which they know as an irrelevant highschool potpourri of numerical techniques. What we have in math is actually a centuries-old dialog of the most widely applicable structural rules imaginable, rules that cover our software applications as a trivial side effect.
The truths of arithmetic govern all that is numerable. This is the widest domain of all; for to it belongs not only the actual, not only the intuitable, but everything thinkable. Should not the laws of number, then, be connected very intimately with the laws of thought?
— Gottlob Frege, Foundations of Arithmetic
I am curious how to write programs using the concepts from abstract math. Can our programs manipulate topologies, groups, and orders directly? How useful are algorithms expressed entirely in these terms? Can we operate on quotient structures?
I don’t want this investigation to devolve into crippling type theory banalities or academic drivel. The concepts involved are sharp and lively and the resulting programs should be too. I hereby promise to never present any esoteric implementation of the factorial function.
Striving after this noble goal doesn’t come cheap. Every day spent in this investigation is a day I make myself less familiar with the latest trends, a less attractive employee. However my thoughts of doing this project and the urge have recurred for years.
I had only to will to go – but to will powerfully and wholly, not to turn and twist a will half-wounded this way and that, with the part that would rise struggling against the part that would keep to the earth.
— St. Augustine, Confessions