Re: [stack] Classifying languages by how they handle operands

"William Tanksley, Jr" <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
Don Groves <[email protected]> wrote:
> It occurred to me recently that one way to differentiate programming
> languages is by how they handle operands.

Sure thing -- sensible.

> Lisp and its cousins use operands only once, placing them in a
> structure preceded by an operator, (+ a b c) , effectively combining
> their passing and evaluation.

Let me add a word to your description:
Lisp and its cousins place operands them in a *lexical* structure
preceded by an operator, (+ a b c) , effectively combining their
passing and evaluation.

I also deleted "use operands only once", since I don't know what you
mean by that. (What did you mean?)

> The languages of interest to this group place operands in a structure
> followed by a sequence of operators, (a b c) + +, which also combines
> passing and evaluation.

...and here my modification is to stress that the structure is a *semantic* one.

The major difference is that the lexical structure is constrained to
the medium of the language -- one-dimensional text parsed into a tree.
A semantic structure can be more complex -- the operand flow for a
stack language is a digraph rather than a tree.

There are pros and cons to both.

> While admittedly low level, is this concept worthy of further
> discussion? Has it been discussed before, either here or elsewhere?

I believe Manfred looked at it before... I can't recall which paper, though.

> Don

-Wm
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.