So I'm not really an expert on this subject, all I know is from David Young's post. Please correct me if this is wrong.
I think I found a way to add infinitely add expressiveness to any stack based language. This could probably be generalized to any language type.
In the base, least expressive version of the language, we have an operator regswap_0
. It pops one element from the stack and copies it to the $r_0$ first register. Now assume this language has no way of actually reading from this register. This is $L_0$.
Now for each version N, we add a builtin $\mathit{regswap}_n$. This builtin will pop a value from the stack, copy it to $r_n$. Then take the value from register $r_{n-1}$ and push it back onto the stack.
Now we can construct a program in this form:
input regswap_(n-1) regswap_n "1" equals if [ loop [ ] ]
If we wanted to compile this to the n-1 version of the language, that didn't have regswap_n
, we'd need to either add a dup
instruction after input or remove the regswap_(n-1)
instruction. Neither of which are local transformations.
Specifically these statements are no longer equivalent in language N
1 regswap_(n-1) pop
[empty string]
Would always be have the same effect in language N-1.
This we can use this technique to construct an arbitrarily long chain of languages with increasing expressiveness.
This won't necessarily ever increase the expressiveness past any other language. You may be able to infinitely increase the expressiveness of Fractran without ever "overtaking" brainfuck, in the same way you can infinitely add to 1 without ever passing 2.