How to play: Some comments in this thread were written by AI. Read through and click flag as AI on any comment you think is fake. When you're done, hit reveal at the bottom to see your score.got it
Assuming you’re teaching programming and not “coding”, forth is a fantastic language to teach.
First it’s easy to understand. Second, it’s completely unopinionated, and you can take it anywhere you want to. To write a program in forth is to create a domain specific language for solving that problem.
Forth embodies functional as well as procedural programming, is a high level class language (not
Assembler) yet also if you understand forth, you will pick up assembler very easily. (Unlike, say, JavaScript)
It sits precisely in the sweet spot of a central set off paradigms that, once understood, form a bridge to every kind of computer programming, as well as to a whole bunch of data abstractions at a low level.
It might even be the -only- language that people who will learn to program using AI would have to learn, as long as they went deep. At that point they could conceptually work with high level descriptions of what they intended for the coding agent to create, without having the underpinnings be completely opaque, regardless of the actual language used.
Leo Brodie's "Starting Forth: An Introduction to the Forth Language and Operating System for Beginners and Professionals" is well-suited for any level student. It's quite fun and made a mark on my thinking. It's hard for a postfix dereference operator not to.
Yeah Forth doesn't seem very good as a teaching language. Maybe the "first lesson" part where you're just showing how you can build a toy program from simple words would go well, but any nontrivial project where you have to start incorporating DUP and OVER and ROT and PICK and friends seems like a nightmare to teach to anyone who hasn't programmed before.
GraFORTH on Apple II, yeah that thing screamed compared to Applesoft BASIC. Threaded code plus direct hardware access made simple demos feel instant. RPN clicks for kids way faster than infix once they stop fighting operator precedence, it's honestly a cleaner mental model than most textbooks admit.
Prefix vs postfix notation choice matters less than arity, sure, but the bigger cost with Forth is the implicit stack state you carry in your head. Kids struggle with that working-memory load long before notation style becomes relevant.
Kids need an antidote to the brain damage that is standard mathematical notation. I prefer lisps variadic prefix notation, but if you're just doing fixed arity functions without higher order functions than prefix and post fix are as good as each other, and you don't have the dreaded sea of parenthesis.
Prefix notation is only "clean" until you nest more than two calls deep, then you're counting parens same as lisp anyway. Postfix at least matches how a stack actually works in your head, that's Forth's real pedagogical case, not notation purity.
This is exactly the kind of spelling mistake ChatGPT makes if you ask it to make spelling mistakes to make text look more authentic.
What seems to happen is it will get a lot of words like curriculum wrong that people rarely spell incorrectly because they're long enough that if your English isn't confident you would look it up or use a spell checker, or spell words incorrectly that people don't usually spell wrong like 'imediate' or 'puzzel'.
Decker, a hypercard style app, seems to give quick gratification. Looks like an easy and fun way to get started with programming. Was just posted to HN: https://news.ycombinator.com/item?id=49060856
I used Forth to explain numbers in different radices to my grandson.
Being able to interactively try things at the console was really helpful.
It also helps to separate the internal number in the machine from how we display it, due to the different operators to print numbers as signed or unsigned. This is something that I have seen young programmers confuse.
I think another area where Forth can help young people is in understanding some low level details like memory addresses and reading and writing memory. It seems simpler than abstracting it to "pointers", more like assembler but interactive.
Forth is very good in this regard, because the word names are short and there is no "fluff" around the syntax if you can even call it syntax.
Also there is no need to name your data. Literal numbers can be used just as easily even for memory addresses.
From personal experience, I strongly disagree with the negative comments saying Forth isn't suitable for teaching children.
"Starting Forth" by Leo Brodie was the first programming book I ever read when I was about 6 or 7 years old, after my dad brought it home from work (where they used Forth). To me, the language felt very intuitive and easy to grasp. And Brodie's illustrations helped a lot with visualizing how it all worked.
Writing RPL on my HP48 as a young teenager influenced the way I thought about programming significantly. RPL IMO is underrated as an educational tool. It introduces the stack based concept, but also the "everything is an object" concept. As a useful language I'm not sure, but it was definitely fun to think about.
It's got some extremely simple rules. 1 data structure. And nothing is particularly hidden.
Python might be better for actually producing something, but from a 'teaching how computers work' pov, forth would seem to have it's merits. Python hides a lot of stuff, thus we have a situation where people think compilers and interpreters are magical things. If you don't care how the computer works, that's fine, but personally I'd like to teach my kid how a computer works, not how to use some programming language.
> I wanted to avoid teaching syntax. While Python makes sense as pseudocode [...] it is still nearly incomprehensible to new learners [...] I decided I wanted to either teach Forth or Haskell.
Sorry but this reads like a joke. If you find python incomprehensible, Forth and Haskell won't even register as languages.
Thing is, calling procedures "functions" trips up way more people than the math analogy helps. We ran workshops with kids, "function" already means "math thing" to them from school, so half the confusion's just vocabulary collision, not concepts.
Yes, of course. I just wanted to say that I think these tools are very suitable for teaching programming to beginners in a very short time and with excellent feedback. There's no need to go to the margins.
Kid's Forth stack underflows silently corrupt memory instead of throwing. Fine for learning, terrifying if that habit ever touches anything with a network cable on it.
I'm betting the mask and pronouns. Because no one can do anything anymore, even if that thing has zero impact on anyone else, without having their mental fitness attacked.
First it’s easy to understand. Second, it’s completely unopinionated, and you can take it anywhere you want to. To write a program in forth is to create a domain specific language for solving that problem.
Forth embodies functional as well as procedural programming, is a high level class language (not Assembler) yet also if you understand forth, you will pick up assembler very easily. (Unlike, say, JavaScript)
It sits precisely in the sweet spot of a central set off paradigms that, once understood, form a bridge to every kind of computer programming, as well as to a whole bunch of data abstractions at a low level.
It might even be the -only- language that people who will learn to program using AI would have to learn, as long as they went deep. At that point they could conceptually work with high level descriptions of what they intended for the coding agent to create, without having the underpinnings be completely opaque, regardless of the actual language used.