News for hackers. Stuff that matters.
Re:Stem, a stack-based language with metaprogramming and a C... by lebuffon on Saturday January 27, 2024 @12:23AM (#39152841)
You are correct, but in Forth for example, the colon is a word in the dictionary of words and so is semi-colon. They just happen to parse the input stream rather than taking arguments off the stack. Everything in Forth is called a "word".

So depending who your lawyer is, : and ; are "words". :=)

Re:Stem, a stack-based language with metaprogramming and a C... by ret2pop on Saturday January 27, 2024 @12:35AM (#39152904)
I am not generally knowledgeable about Forth and languages like it because the only experience I have writing in anything close to forth is in my own language. Thanks for explaining.
Re:Stem, a stack-based language with metaprogramming and a C... by ithkuil on Saturday January 27, 2024 @07:32AM (#39155004)
Yes. In forth some words have the "immediate" flag set. When such words are encountered during compilation they are executed nevertheless. This allows words such as ; to end a word definition and return to interpretation mode.