-
Notifications
You must be signed in to change notification settings - Fork 1
thinking forth
Christopher P. Brown edited this page Jan 25, 2022
·
2 revisions
:forth📖
A Language and Philosophy for Solving Problems
by Leo Brodie
read: 2021
It's about Forth but it's really about general program design.
Forth has implicit calls and implicit data passing (thanks to the stack). This allows for very concise, terse programs that are also very flexible and maintainable: it is possible to redefine a constant as a function ("word" in forth) and not have to change any other code: calls are implicit. (See: apples.forth)
or, ways to handle complexity
- By components. Example: text field editor (overwrite, insert, delete) has a key stroke interpreter and a display refresh component. Control flow is a superficial element of program design. The Interface Component is an important part of this design phase and has two interfaces: control (how it is invoked; a non-issue in forth) and data (in forth, either the stack or pointers)