Arc Forumnew | comments | leaders | submitlogin
3 points by ryantmulligan 6113 days ago | link | parent

Either you can make a word that takes the 3rd element from the stack while maintaining order, or there already is one.


1 point by sacado 6112 days ago | link

But in other languages you don't even have to bother with that. Accessing the third element of the stack is easily feasible and you can even guess how to do it.

And the fact that my variables have no name (they're all called "first element on the stack", "second element", etc.) reminds me assembly code, but without the efficiency : I can understand that in a low-level language as Forth, but it doesn't look like Factor is one.

But I can be wrong, and anyway Factor is on my "try it again later" list.

-----

1 point by mst 6111 days ago | link

On the one hand, factor -does- have named variables.

On the other hand, once you start experimenting with stack stuff there's a moment where you go "aha" and it actually starts to make a lot of sense for temporary variables.

There are probably other aha moments further in that I haven't got to yet; I've not spent as much time with factor as I want to.

I dunno if I'll ever use it for "real stuff", but I think it's worth fighting your way through to the aha moments just like lisp and haskell are even if you never expect to use -them- for "real stuff".

-----