Forth in general is interactive, accepting a line of text and numbers separated by spaces from the terminal console and then interpreting the text in this input buffer when you hit the enter key. If we type 12 100 * . then when we hit enter the text string will be evaluated as a word 12 which is not in the dictionary and then tries to convert it to a number and push it on the stack. Fortunately it is and so is 100. This takes time to read the word and search the dictionary and then try to convert it to a number. By the time that the * and the . are read and found in the dictionary, and executed, quite some time has passed, maybe many tens of milliseconds or more. Yet if we define a new word that does the same thing and then execute it, it only takes tens of microseconds, mostly in printing the number. The difference is that one interprets the text, and the other just executes code.
Tachyon tackles this tradional "text input buffer" and evaluation very differently. First off, there is no line buffer, only a word buffer. Second as each word is entered the word will be checked to see if it's a number, and if it is, it will immediately be compiled into temporary code space as a numeric literal. So 12 and 100 would not be pushed onto the stack after a line is entered, but rather they are compiled, word by word. The same too with * and . and all the while as new temporary code is compiled, it is automatically terminated with an EXIT, which is the Forth equivalent of a return-from-subroutine. When the enter key is pressed there is no further delay, no need to start interpreting the line, but instead the code that has already been compiled in the temporary memory area is simply executed.
ADVANTAGES of TEMPORARY WORD by WORD COMPILATION
What's the advantage of compiling word by word? Well, we don't need to reserve memory for a long text input buffer, and we also don't lose any time with executing the code when the enter key is pressed. But more importantly, the code is executed at full compilation speed, just as it would be if it were compiled into a definition. Some I/O operations are timing sensitive and can ony be timed correctly from compiled code.
But there are other advantages too. For instance, in Forth you can't use "compile-only" words interactively, but now we are compiling, you can use them just the same.
TAQOZ# 5 6 * 20 > IF ." Greater than 20 " THEN --- Greater than 20 ok
Also, you can use BEGIN WHILE REPEAT AGAIN IF ELSE THEN DO LOOP LOOP+ FOR NEXT etc although the latter loop words are actually not "compile-only" words in Tachyon anyway, since they compile as is, not requiring any branch calcuation.
TAQOZ# 0 10 FOR I + NEXT . --- 45 ok TAQOZ# 0 0 BEGIN OVER + SWAP 1+ SWAP OVER 10 = UNTIL NIP . --- 45 ok
To find out more about DO LOOP FOR NEXT etc, look at the Wiki pages for "LOOPs never return"