Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I saw lots of comments praising it, but none gave examples, what's the example pitch?


The next time a thread about "what should I give a kid today instead of BASIC" rolls around, a Forth with Starting Forth and Thinking Forth is a probable answer.

Forth gives an even more direct experience than the microcomputer BASICs did: you wrote a word, it was a number so it went on a stack, then you wrote a different word, and it popped the number from the stack. You allocated memory with ALLOT. Now when you run HERE(the address of the bump allocator), you see that it moved up by the amount that you passed to ALLOT. You can use SEE to explore word definitions and get a sense of how much of the language is implemented in itself. You can explore the double number arithmetic to learn fixed point maths.

It just poses a certain clarity and lack of restriction that is only limited by how much the programmer can reason through their abstractions. Thinking Forth helps with that, in that it shows that you can often solve things in a simpler way than you thought.


It starts by teaching the basics of programming logic, and by the end you know how to build and test a larger system.

It starts by explaining what is a stack, and by the end you could implement your own Forth.

And it shows how those two tasks can be one and the same.

(is this what you meant by "example pitch"? I'm not familiar with that term)


A previous thread on that question: https://news.ycombinator.com/item?id=14852625




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: