This commit is contained in:
Luxferre
2022-09-19 18:22:08 +03:00
parent 5868cfb8c3
commit 8a17ea5edf
+1 -1
View File
@@ -241,7 +241,7 @@ While Equi definitely is a minimalist runtime, it's not limited to a 16- or 32-i
### Why is there a distinction between instructions and custom-defined words? Forth doesn't have one!
This distinction only exists to simplify program interpretation flow. Forth uses whitespace as an essential syntactic feature to delimit words and literals, Equi does not. Therefore, the only way to distinguish between a string literal and compiled word definition is my the means of a special instruction. And using for the compiled words the same approach as for the hexadecimal short literals (automatically try to detect one before an instruction) would be too resource-heavy for the oldest systems as it would involve computing CRC16 on the literal stack contents every single instruction. A dedicated instruction that denotes what to do with the literal stack is much more convenient and straightforward to implement.
This distinction only exists to simplify program interpretation flow. Forth uses whitespace as an essential syntactic feature to delimit words and literals, Equi does not. Therefore, the only way to distinguish between a string literal and compiled word definition is by the means of a special instruction. And using for the compiled words the same approach as for the hexadecimal short literals (automatically try to detect one before an instruction) would be too resource-heavy for the oldest systems as it would involve computing CRC16 on the literal stack contents every single instruction. A dedicated instruction that denotes what to do with the literal stack is much more convenient and straightforward to implement.
### Is Equi self-hosted, i.e. can it compile and run a new version of itself?