3 ms·
...within the syntax constraints of s-expressions. Forth allows you to define your own syntax as long as it's whitespace delimited.
by chrisjsmith 15y ago
...within the syntax constraints of s-expressions. Forth allows you to define your own syntax as long as it's whitespace delimited.
- limmeau 15y ago... and as long as every sequence of words is a valid program.
- chrisjsmith 15y agoI think that applies to all programming languages :)
- limmeau 15y agoNo, many languages have a grammar in order to reject malformed programs, so that not every sequence of words is a program. AFAIK, you can define your own FOR loops in FORTH, but you can't enforce statically that each FOR has a matching LOOP; the mismatched program will happily run and corrupt the return stack (if you use the return stack top to store the loop index so that it will be available using the magic word I).
- chrisjsmith 15y agoThat is true - i'll give you that. TBH I have fallen down that hole.
- zitterbewegung 15y agoI don't see how that refutes my point?