r/ProgrammingLanguages • u/tobega • Apr 21 '26
Blog post Raising the abstraction level in programming languages
In the 1950s, programming languages rose above the level of direct machine instructions to be based on the mathematical models of computation instead.
This is still quite low-level compared to what programmers really want to achieve, which makes code harder to write and review than would be desirable. Making the connection between the code and the program logic more direct would have real economic consequences.
In this essay I take a look at that intent-to-implementation gap and some possible re-imaginings of how things could work.
https://tobega.blogspot.com/2026/04/rising-above-mechanics-of-computation.html
View all comments
Show parent comment
1
u/useerup ting language Apr 21 '26
Mutable state is a problem that (pure) logic languages have in common with (pure) functional languages.
For functional languages, monads is one solution you can deploy. Effect systems is another solution that will also work for logic languages. Both monads and effects solves the problem by "hoisting" the mutating bits it out of the program. In my opinion this is a way to externalize the state. It makes the program pure because it simply is not concerned about mutating state, or it is at least isolating the mutating behavior in a number of "impure" functions.
In my language I try to internalize the state: The program describes both the state model and the transitions between instances of valid state models.