Re: [stack] the concatenative wikipedia article

"William Tanksley, Jr" <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
Christopher Diggins <[email protected]> wrote:
>>> 1. Concatenative should not be conflated with "stack-based". I have
>>> already shown that the counter-examples are beyond mere curiosities.
>> I'd like to see your examples, specifically emphasizing how you know
>> it's concatenative. I didn't notice them.

> Allow me to present the deque language that I just made up.
> 1! - Pushes a one to the right of the deque
> !1 - Pushes a one to the leftt of the deque
> add! - Adds the right two numbers of the deque
> !add - Adds the left two numbers of the deque
> ...

> 3! !5 !2 sub! !add
> If applied to an empty deque this will leave the value 4 on the deque.
> So is this a concatenative language? It satisfies many of the
> criteria, but I am not sure. If we could agree that this is or is not
> concatenative, it may prove useful.

By all three of the definitions I posted, as well as the Wikipedia one
(stripped of its parochial insistence on stacks), this qualifies. As a
bonus, my gut feeling is that it's concatenative. It's definitely more
complex than working with a stack, but there's nothing inherently
wrong about that -- and perhaps there's a data structure that's
inherently simpler than a stack.

OTOH, can a concatenative language ever be infix? I'd find it odd... A
fundamental property is syntactic associativity, and infix isn't
associative... Or can it be made so by means of currying?

> Agreed, I think there is value in refining the term concatenative.
> However, I think it is more important to define it here than somewhere
> else like a wiki where people with no knowledge of the subject can
> make arbitrary uninformed edits. Besides whatever is agreed upon in
> the list can serve as a source of citation for the Wikipedia article.

Granted, but a mailing list is ephemeral.

> - Christopher

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