▲ | boothby 3 days ago | ||||||||||||||||
Forth is a bit of a headtrip for people due to (a) how it parses and executes and (b) the stack-based nature of it. Particularly, symbols traditionally considered syntactic are fair game* for user-space definitions, and some words are "immediate" which means that they act at compile time, where others act at runtime. This combination seems particularly challenging for students of languages which don't mix compile-time and runtime, only use a stack for function calls, etc. I'm of the opinion that one must write a forth to grok forth, and I'm far from alone in that. However, I'd not quite call forth itself esoteric. But to many, it's a language family... of which most of the members are esoteric inasmuch they only have a single user. * shout-out to my friend whose forth supports lists, hash tables, and structs through syntactic sugar... https://github.com/cstrainge/sorth | |||||||||||||||||
▲ | OhMeadhbh 3 days ago | parent | next [-] | ||||||||||||||||
Why is RPN a head trip? Or rather... I don't think it's as much a head trip as prefix or infix notation. You've got your data. You've got your operation. Sometimes the data is on a stack. Sometimes it's on a heap. Just a little different way of specifying which is where. Also... +1 on the "you've got to write it to understand it." And in the 80s, the documentation wasn't super. Leo Brodie's book was great to get you started, but understanding things like ' (tick) and how to program in "idiomatic forth" was a challenge. So I would add, "not only do you have to code FORTH to understand FORTH, you also have to rip someone elses' FORTH program apart to understand the more advanced bits." -- I could be wrong about that today, it's been a while since I did a survey of FORTH documentation. | |||||||||||||||||
| |||||||||||||||||
▲ | jacquesm 3 days ago | parent | prev [-] | ||||||||||||||||
My bigger problem with read other people's Forth is that no two Forths are the same. The language itself isn't really the problem. It is that you can only approach someone else's Forth code bottom-up otherwise you just don't understand at all what is going on. Most other languages allow you to dive in from the top, learn as much abstraction as required to get the job done and then you can move on. | |||||||||||||||||
|