3 ms·
> Q. Could you define “better” in this context? > A. Easier to read and maintain, fewer bugs, smaller, faster development. That's fairly subjective. I find th
by davidw 16y ago
> Q. Could you define “better” in this context?
> A. Easier to read and maintain, fewer bugs, smaller, faster development.
That's fairly subjective. I find the whole "keep track of the stack in your head" thing quite irritating, to be honest. Forth is more dynamic than C, certainly, but beyond that, I find C much easier to utilize in that you mostly concentrate on what you're doing rather than dup dup swap drop roll bee bop a lop bam boom tutti frutti etc... C's big "extraneous" overhead is keeping track of memory allocation.
- eru 16y agoYou can use variables in Forth. It's just scorned as non-Forth-ish. And you also have to keep track of memory allocation in Forth. (Though it's possible to write a garbage collector.)
- pietrofmaggi 16y ago"Though it's possible to write a garbage collector." There is a Garbage Collection package available for Forth here (http://www.complang.tuwien.ac.at/projects/forth.html http://www.complang.tuwien.ac.at/projects/forth.html).
- joe_the_user 16y agoBut take note: > Q. So why doesn’t everyone use Forth? > A. Because it is also possible to write worse programs > in Forth than in C.
- davidw 16y agoThat's their rationalization, at least. I think that for the average programmer, having to keep track of the stack is just added mental overhead that gets in the way of making their program do something useful.