Re: [stack] Monads in a Stack-Based Language

"Daniel Ehrenberg" <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
On 7/13/07, William Tanksley, Jr <[email protected]> wrote:
>  Yeah, so do most "concatenative" languages (scare quotes, just for
>  fun). Locals are conceptually a bit risky for me; I feel like they're
>  foreign to the language. We're all trained in imperative applicative
>  languages so locals look natural -- but most of us don't even have a
>  precise model for how locals work in _applicative_ languages. (Look
>  how hard the authors of SICP have to work to teach the concept.)

I agree. I don't understand why stack-based languages should have
locals. There are a few edge cases where variables might be necessary,
and as far as I can tell, those consist of (a) math formulas and
similarly complex things and (b) shared data that should be implicitly
passed between functions. The former would call for some kind of math
DSL, and the latter would best be solved by global or dynamically
scoped named variables. Sometimes, a problem most easily be solved by
named variables is being solved the wrong way, though that's of course
not always the case.

Daniel Ehrenberg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.