Re: [stack] initial stab at a wikipedia entry
John Nowak <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
On Jan 2, 2009, at 9:50 AM, William Tanksley, Jr wrote: > Not true -- a variable can be modeled (loosely) as an implicit > function of time. Forth provides local and global variables; locals > seem to make a language less concatenative, while globals don't hinder > it so much. (Naturally, globals have other problems.) Global variables can be treated as functions that read/write some state that gets passed through the program thanks to the monoidal nature of things. Local variables cannot; their scopes are local and hence you can't factor out code that references a local variable. The only way of explaining locals is in terms of substitution. I'm not sure if you think my explanation above rules out locals. If not, perhaps it would be beneficial to include "factorability" as part of the definition of concatenative languages, e.g. 'f g h == f i where i == g h'. I was hoping to get away without having to explicitly mention this (and hence doubling the length of the definition). > I'm also thinking about expanding the point about monoids a bit. We > have a little to be said on that issue that can't be said on the page > about monoids. You're right. My only problem is trying to find something to cite in the logs. I'll come up with something most likely... - John