Re: [stack] What does "concatenative" actually mean?
John Cowan <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
William Tanksley scripsit: > The truly pure functional languages, like Haskell, have a mathematical > model for state-changing effects, like objects and I/O. The problem is > that purely functional languages don't express what order their > operations will occur in; they just tell the computer what operations to > do, and let the compiler figure out the best order. So Haskell provides > a mathematical construct called a "monad". Monads can mathematically > only be evaluated in order, so the compiler receives enough information > to know what order to execute your code in. You don't really need monads: they are just a convenience, because it would be painful to thread state through every function in your program just in case a callee wants to use some of it; see http://lambda-the-ultimate.org/node/1155#comment-12726 for details. In Joy, the equivalent of the I/O monad is the simple fact that "read" has a stack shape of F -> F O, preserving the F object on the stack. -- One Word to write them all, John Cowan <[email protected]> One Access to find them, http://www.ccil.org/~cowan One Excel to count them all, And thus to Windows bind them. --Mike Champion