Hacker News new | ask | show | jobs
by undrcvr-lagggal 4159 days ago
I've always wanted to learn a Lisp, but I've found Scheme too academic, so I ended up learning other variants such as Common Lisp and Clojure. Could the same thing be said about Factor vs Forth?
2 comments

Yes. Factor definitely has a much more modern feel but loses a lot of the purity. That said, Factor is still pretty "pure" by the standards of most languages.

Forthish languages are very interesting. I feel they might even represent a "third way" from the normal LISP / FORTRAN dichotomy.

You get Lisp or Fortran by adding discipline and using the stack language as a back end. Then instead of "pop three things off the stack and put one back", that stuff is hidden and generated by the compiler, so (on the plus side) the stack pointer is never wrong. You don't have to worry about: if I take this branch of the conditional, will the stack be left at a different height. Or worse: be tempted to exploit that somehow as a feature. The stack basically disappears from view. And then (on the minus side) you can't do things any more like replace a function that pops three things, by a sequence of two functions where each pops two and puts one back. On the plus side again, because the stack has disappeared, you can really change how it is represented. Like pass and return in registers; aggressively inline functions, etc.
There's a always been more than just those. E.g. declarative languages, such as prolog.
Yes, and even "FORTRAN" side represent several approaches - for example, straightforward imperative, like in assemblers or classic BASIC, or structural - which was a big step forward at the time - like Pascal.

Then you have object-oriented languages, which are still different from structural, string-oriented Tcl, array-oriented APL...

Sort of. The big difference is that forth is still reasonably widely used. Much more so than factor, not that they target the same domain.