Is AI the next layer of abstraction? by Mark Seemann
A question of semantics?
With increasing frequency, I come across the notion that large language models (LLMs) constitute a new level of abstraction in programming. A recent post on LinkedIn puts it well:
"AI will be the next layer of abstraction in IT.
"First we thought in machine instructions, then in procedures and functions, then in objects and patterns that are now built into the languages. With AI, we can use ordinary words to describe what we want, and then the AI writes the code."
The post has a bit more to say (in Danish), but is less relevant to the topic that I wish to discuss. To be clear, I have nothing against the assertion made, because whether you believe it ultimately boils down to how you define the term abstraction.
Semantic levels #
How do you define the word 'abstraction'? While I could do a Rich Hickey and look it up in the dictionary, I rather want to pull from other sources. In ordinary language, the word can mean many things to diverse people, while in the context of programming, we have the opportunity to be more specific.
You could argue that I'm now appealing to authority, but that's not the point I wish to get across. Rather, the layers of abstraction that Hans Kilian lists have some particular properties, nicely phrased by Edsger Dijkstra:
"the purpose of abstracting is not to be vague, but to create a new semantic level in which one can be absolutely precise."
The requirement that the new layer of abstraction is precise is important. In general, earlier layers of abstraction have been precise in the sense that they are well-defined. (There are exceptions. C infamously have unspecified language features. Haskell, too, is vague about what exactly Int is.)
The demand that one level of abstraction has a precise meaning in terms of the next level down is, as I view it, a fundamental property of how programming-language abstraction works.
Precision #
How should we think about precision in this context? Fortunately, a complete definition is not required. A few crucial properties are enough to realize that LLM-based programming is not precise.
In order to be "absolutely precise" we should at least demand that translation from a higher to a lower level of abstraction is
- well-defined and
- deterministic.
LLM-based coding is neither. When you write an instruction using ordinary words, the translation to code is not defined at all, but rather the result of a prediction system. Furthermore, as most users of LLM hopefully realize, issuing the same prompt twice often elicits different results.
Tools versus automation #
The above argument hinges on a particular understanding of the term 'abstraction'. I find this understanding proper in the context of programming-language abstraction, but this is not to say that it's the only reasonable interpretation of the word.
Used more loosely, it seems evident that the ability to write program specifications in normal language, and get an executable artefact out of it, surely feels like abstraction. I think, however, that it's important to realize that it's not the same kind as we have previously understood it.
Overlooking, or failing to understand, this difference seems dangerous to me. In the words of Rich Hickey, compilers are tools, whereas LLMs offer automation. Tools are predictable once mastered. Automation may or may not be predictable, but is not wielded. You have to trust that the automation does what you intent. Given that LLM-based automation is fundamentally non-deterministic, I personally have a hard time mobilizing such trust.
Conclusion #
Is AI the next layer of abstraction? The answer depends on how you define 'abstraction'. In the narrow sense that programmers and computer scientists have historically thought about programming-language abstraction, LLM-based programming is fundamentally different. Under such an interpretation, using LLMs to write code does not constitute a level of abstraction.
If, on the other hand, you view levels of abstraction as force multipliers that enable you to do more with less, then yes, LLM-based programming may be viewed as the next level of abstraction.
It's up to you to decide which interpretation of the word you prefer. I can't be the judge of that. The point is rather that this new source of productivity is fundamentally different from previous incarnations of programming-language abstraction levels. Understanding this difference may be key to using the new technology effectively and safely.