News for hackers. Stuff that matters.
Re:Starting Forth – the classic Forth language tutorial by liyanchang on Thursday June 20, 2013 @03:16AM (#5910675)
tl;dr

Forth is a programming language from the 1970s. This is the canonical book, published by someone who works at Forth Inc. (as K&R is to C)

Forth is interesting, not because of widespread usage, but because it has a different way of looking at things. Reminiscent of people who tell you that you should learn LISP because you'll never use it, but it will make you a better programmer.

The key difference is that it is stack based. (For those who are more mathy, you may have heard of RPN on the HP calculators)

e.g. 2 5 * 3 -

is take 2 and 5, multiply them. Take the result and 3, subtract them. get 7.

The wiki article has a nice picture of stacks that may help: http://en.wikipedia.org/wiki/Forth_(programming_language)

(btw, not super knowledgable about this stuff; just super confused, did some digging and figured others would be confused as well. Happy to edit.)

EDIT 1: Habits die hard. Corrected Fourth to Forth.

There are no comments on this comment yet.