If one understands adding and consuming values at the top of the stack, putting the stack in the state you want it is certainly a small logical step without new theoretical baggage.
Word definitions and the accompanying pointer tricks are more likely to be challenging.
Not sure they are that interested in programming, but FORTH is a little sweet language.
My first experience with it was Paul Lutus’ GraFORTH. On the Apple II it was ridiculously fast.
n coined the term careware. iirc.
first-hand info. i had downloaded n used arachnophilia.
he is on hn.
Prefix technically doesn’t need, either, if you avoid functions taking variable number of arguments and have a grammar that can reliably detect function calls (could be hard if you’re allowing higher-order functions)
Even with functions taking a variable number of arguments, you could do it the C way and use the argc, argv trick, giving you
* 2 + 3 5 6 7 3 ⇒ (* (+ 5 6 7) 3) ⇒ 54
I think you’d have to be a bit of a masochist to do that, though.That also is why I think varargs functions tend to be rare in bare bones forths. You’d have to write
5 6 7 3 + 3 2 *
Using custom names for the varargs functions would help for the 2-argument version."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.
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.
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'.
Sorry but this reads like a joke. If you find python incomprehensible, Forth and Haskell won't even register as languages.
This language is simple unintuitive and the Polish math notation will cause even more confusion.
>> Overall, I don't believe the programming language matters all too much.
Delusional. There is a reason why 99.99% of large projects are done in imperative languages.
I like programming a lot but if my programming journey were started by this teacher and might just became a chef instead.
This seems to be a "do novel things for novelty sake" thing.
Kids need to see the practical applications in the simples and most intuitive way of the things they are learning.
Forth or similar languages are not it.
Even in university level students these languages are both confusing and unintuitive and slow to develop in compared to imperative languages.
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 wonder if assembly is a better choice... hmmm...
Assembly is add R1 R2. Forth takes the 2 numbers from the TOS and puts it in those registers. That wasn't obvious what was happening in the post, I wonder if student me would have wondered.
You could make the case for going all the way down to the silicon.
We teach English, maths, science to give a rounded understanding, not to make student productive or give them information that will be immediately useful. IT/computing in secondary school should be doing a similar thing. It should remove the mystery of what a computer is. That it is programmable. Hopefully it's improved since I was young and we were basically shown how to use Excel.