4 ms·
I came to Forth after programming in Postscript and still have a fondness for stack-based languages. I actually think Postscript was the better language of the
by protomyth 16y ago
I came to Forth after programming in Postscript and still have a fondness for stack-based languages. I actually think Postscript was the better language of the two, it seemed to easier somehow.
// In the early 90's I got a job that needed me to create a lot of reports / graphs out of a foxbase database. I had a postscript printer and a copy of Turbo C 2.0 (don't forget to download the floating point patch). Gotta love hand coding Postscript templates. I was loving life when I finally got a openstep box.
- RodgerTheGreat 16y agoFactor's heterogenous stack (complex objects rather than integers) definitely reminds me more of PostScript than Forth, and I agree it can make programming much more straightforward. I also liked how PS handles flow control- while Forth uses rather traditional looking left-to-right reading constructs: 3 5 > if ." greater" else ." less" then PostScript goes with operators like "if" and "ifelse" that consume code literals from the stack (enclosed in curly braces): 3 5 gt { (greater) print } { (less) print } ifelse It's a little heavier weight, but very flexible and it feels like a natural way to handle postfix conditionals.