Idiom-enabling optimizations

In stack languages, environments don't need to be copied from a call site to the interior of a function because every function simply looks at the data stack.

The data stack combines the best qualities of a global namespace and lexical scoping by strongly encouraging the programmer to keep only 2-3 values on the stack at a time, yet those values are still "global."

This means that there is very little overhead involved with calling a function compared to most languages, and so stack languages usually encourage very small functions (which they usually call words).

I'm not even really sure what you would call the idiom, but I know it when I see it.

Sam Falvo's VIBE editor is one of the best examples I've seen; I think it's beautiful: https://www.complang.tuwien.ac.at/forth/vibe-2.1ans.fs

Every single word (function) easily fits on a single line.

/r/ProgrammingLanguages Thread