Problem is… the Teletype language is based on Forth, and Forth is a bit of a “write once read never” (WORN) language.
Admittedly Forth is even worse as it’s reverse Polish notation (RPN), rather than the Polish notation that we use.
We get away with it’s unreadability because the scripts are so short. Imagine a 500 line long Teletype script open in your favourite text editor! To go up to that level we’d have to start moving towards adding brackets a la Lisp, and Lisp is a fundamentally different paradigm to Forth.
Things of interest about the Teletype language:
- Forth (RPN) itself is extremely light on memory usage. Internally our Teletype code (forward Polish notation) is run backwards (with some allowances added in for sub commands / PRE statements).
- The grammatical rules of the language are really simple, unlike infix notation, there are no issues with operator precedence.
- It’s easy to write a parser for the language due to it’s simplicity.
- It runs quickly (again due to it’s simplicity).
- The above points mean that you don’t need to be a compiler or language expert to get involved with firmware development.
- No runtime errors, something that is not picked up very much, but the design of the language rules them out.
- There is even a bit of functional programming in there… a
MOD
, (i.e. the first part of aPRE
) actually takes code as one of it’s arguments (thePOST
, or the bit after the:
).
edit: I’ve added “no runtime errors” to the list at the top, please feel free to make it more poetic
edit 2: I actually think it should go at the top of the list and be in bold