This is a card in Dave's Virtual Box of Cards.
Compiling by concatenating (Forth)
Created: 2022-03-25 Updated: 2022-10-18
A concatenative language idea! Or "a pure inlining compiler".
Update: This is now my current project! It’s called Meow5 (github.com) and you can watch it grow. See also Assembly Nights 2.
Idea: Inlining complete words (basically compiling by recursively concatenating words together until the output is a single big string of assembly) would be super interesting, but two challenges:
The program will balloon in size if large-ish words get used over and over.
The interpreter has to be an assembler (all jumps to addresses will need to be adjusted)*
NOTE*: Actually, for #2, I think relative jumps will work just fine. I haven’t gotten there yet with Meow5.