Live data from Hacker News

Forth

xkcd.com

1–10 of 56 posts

Re: Forth

#4

Can someone explain for me?

Forth uses RPN so the "verb" is last.

That is, you provide the data first (I and Forth) and the command (heart) last.

Re: Forth

#8

Can someone explain for me?

A different way to say the same: in forth, words get pushed on the stack, and popped from the stack by words that take arguments:

    code           stack
    I Forth love

    Forth love     I

    love           I
                   Forth

    ; love presumably pops
    ; subject, object args
    ; from stack - and does something 
    ; perhaps prints as side effect

Re: Forth

#9
post #3

Can someone explain for me?

Forth I assume uses reverse polish notation: arguments before the operator. 3 4 + for example, would return 7.

> would return 7

more pedantically, it would push 7 onto the stack

Post reply on HN