hanelyp wrote:Having done C/C++, multiple forms of assembly programming, Forth, and numerous assorted high level programming languages, I'd say Forth programming feels a lot closer to assembly programming than any of the other high level languages I've used. That includes development time. Having to keep manual track of the stack is a pain in the posterior.
Why do you need to keep manual track of the stack? What you have to keep track of is that producers = eaters. Something you have to do in any language.
I have seen a fairly consistent 10X productivity improvement over "C". I did a project once where my factor was better than 100X. I have heard of the occasional 1,000X. It seems stupid to throw away those kinds of results because it is annoying to make sure your pushes and pops match.
Close to assembler? i.e. close to the machine? That is a feature. Supposedly a "C" advantage.
So what does a stack machine give you? You don't need so many named variables. A routine can return more than one value if you need to. BTW "C" is a stack machine - a poor one IMO but never the less a stack machine. As are all compilers.
I have discussed Forth with compiler designers. They get it. Because that is how they build compilers.
Reverse Polish --> You can't compute 2 * ? until you know what ? is. So reverse Polish actually makes the most sense.
2 4 *