The many meanings of “stack
ezzeriesa.notion.site·13h·
Discuss: Hacker News
🔗Concatenative Programming
Preview
Report Post

Author’s note: Hacker News comments here.

With regards to “same word different meaning”, the term stack comes up top (pun intended). This post is not written to be comprehensive, but I hope it provides sufficient detail to save you the few hours I spent being very confused.

Stack vs queue

The stack is a data structure where it’s easy to remove the item most recently-added to the collection (Last-In-First-Out or LIFO). Think of a stack of pancakes, where it’s easy to remove the pancake at the top. This is in contrast to the queue, where it’s easy to remove the item that’s been in the collection for the longest time (First-In-First-Out or FIFO).

![From Crafting Interpreters](https://s3-us-west-2.amazonaws.com/s…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help