There is much written on the style of Forth programming and, indeed, there is book
called ``Thinking Forth''[8].
Here are a number of recurring statements on programming in Forth that are relevant
to sections of this tutorial:
- Build your application from the bottom up, testing new words as you go.
- Choose simple and meaningful names, so that the intent of each word is clear
and your code is easily read, almost as statements you would make to another person.
- Always provide stack-effect comments.
- As you build your application, refactor your code aggressively so that you
don't need complicated stack manipulations to access your data.
- Clean up after yourself and don't leave rubbish on the stack.
- Use the return-stack for temporary storage when it makes your code cleaner
but be very careful to clean up when doing so.
Peter Jacobs
2013-06-12