
Not All Queues Compose - bothra90
https://www.notion.so/whole-sum-parts-099504c4e4234b55b9d5189704ff3fc8?p=9c2bfcf2910f46ceae4af6ba4fada83b
======
brudgers
Traditionally, last-in-first-out data structures are called "stacks" to
distinguish them from queues. In this tradition, "queue" only refers to first-
in-first-out data structures.

~~~
bothra90
Point taken, though I like to think of stacks as one of many ways of
implementing LIFO behavior.

~~~
brudgers
I used "stack" to name the LIFO logic sequence not an implementation idiom.
Linked list, pointer into sequential memory array, or restaurant plates have a
congruent dimension that "stack" abstracts over within the ordinary computing
tradition.

To me, your observation of the non-composability of stacks seems related to
the ability of push-down automata and turing machines to compute more complex
inputs than the finite automata (and equivalents).

[https://en.wikipedia.org/wiki/Automata_theory](https://en.wikipedia.org/wiki/Automata_theory)

