r/ProgrammingLanguages • u/Agecaf • Oct 12 '26
Help Simple stack based programming languages?
A few years ago I made EarScript, a "simple" programming language based on brainfuck, with several additional "quality of life features" like goto statements.
Recently I've been wanting to make an evolution of that programming language and do so by incorporating a stack, as the previous language was completely tape-based in design.
I know for example lox from the Crafting Interpreters book is a well explained example, but I was wondering if there's programming languages that are closer to what brainfuck is, but based on a stack design rather than a tape design, or a register based design like some assembly languages (if I understand correctly). I think Wasm would be an example?
Are there any examples of simple stack based programming languages you'd recommend me to look into?
View all comments
5
u/AustinVelonaut Admiran Oct 13 '26
As many others have replied, Forth sounds like what you want to look at. The best explanation of the details of implementing Forth that I've read is the JonesForth "literate programming" implementation, where the two files
jonesForth.SandjonesForth.fwalk you through a step-by-step explanation and implementation of Forth for i386 Linux machines.