Re: [stack] Re: Concatenative Research

"William Tanksley, Jr" <[email protected]> Thu, 3 Feb 2011 20:38:57 -0800
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
Justin <[email protected]> wrote:
> Agreed! Quotations should be opaque, functions
> should be unable to gauge the depth of the stack,
> and functions should be unable to discern anything
> about the parts of the program following them.

What I'd say is that programs tend to be less closely coupled together
when they don't depend on the structure of the functions they call (or
otherwise use); don't depend on data used by their callers; and don't
depend on the structure of the source they're called from. (This is
simply a rephrasing of what you've just said.)

Is that a "should"? Only when the benefits exceed the costs.

Many Forth programmers use its ability to look forward in their own
source, and concatenative languages in general have that potential in
a rather interesting manner. (Not "unique", mind you -- lazy languages
can also look at their own source.) But when you DO that, you lose
something as well.

Gauging the depth of the stack seems like suicide -- but when you're
running on a GA144 array, if you DON'T know, you're probably stepping
on something important (your stacks are only 8 elements deep, and
circular; you have two stacks per core, and 144 cores).

I don't have a strong appeal in favor of non-opaque quotations; I
don't find them to be immensely practical, but you have to admit that
they're one of the fun features of Joy. Getting rid of them is boring.
Replacing them with a separate function syntax and a conversion
operator is OK, I guess... But hardly appealing.

-Wm