Re: [stack] stOck

spir <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <20090310200135.35e2b2d9@o>
Le Tue, 10 Mar 2009 08:10:32 -0700,
William Tanksley <[email protected]> s'exprima ainsi:

> spir wrote:
> > [Sean: thought you may be interested.]
> 
> Indeed -- Raven is a very interesting language.

I like the way one can simply name formal parameters using 'use'.

> > Hello concatenators,
> > I would like to exchange about possible drawbacks of a data stack and
> > a weird idea on a possible replacement. Maybe all of this is not new,
> > sorry if ever, but I could not find references.
> 
> One question: How does this differ from any other semi-concatenative
> language's support for "local variables"?
 
As I see it, not the same purpose, while there are indeed overlapping use cases. Local vars, as such, are not passed on the stack/stock: they do not belong to the data flow.

But there is another drawback of my proposal (I realized a short while after posting ;-). The logic is not the same inside the func def and from the caller point of view. Precisely, the definition will often be genral while the call is specific. As a consequence, proper naming should not be the same.
For instance one might define a func that works for any integer and call the arg 'n', while for the caller it should be named 'count', 'pos', or whatever.

Denis
------
la vita e estrany
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.