Join Nostr
2025-08-21 18:02:39 UTC
in reply to

typeswitch on Nostr: this isn't a joke btw. we could write words in forth that take parameters from the ...

this isn't a joke btw. we could write words in forth that take parameters from the return stack, and doing so turns the forth into an expression language, because you have to invoke everything with the right number of parameters or else it crashes.

e.g.

: plus r> 2r> + >r >r ;

to invoke it i need to pass exactly two parameters on the return stack, e.g.

10 >r 20 >r plus

puts 30 on the return stack. but i can still "nest" these expressions (postfix style) e.g.

10 >r 20 >r plus 30 >r plus