Eli5-What does a “stack overflow” mean?

1.25K views

Eli5-What does a “stack overflow” mean?

In: 847

41 Answers

Anonymous 0 Comments

Basically a place where programmers who think they’re better than everyone go to hate on any beginner trying to learn new concepts.

Oh, you mean like an actual stack overflow? A stack is basically a basket used by a program. When you use functions, variables, or store anything that is used short-term, it gets put on the stack. However, the stack/basket can only hold so much stuff.

(Some higher level stuff, but oh well) Let’s say you are using recursion to find the nth fibonacci number. If you want to find the 1,000,000th number, that means at least 1,000,000 things are getting put on the stack/basket. The stack is usually small because people don’t expect you to use tons of variables or function calls, so if you have a million things in your stack/basket you get a stack overflow error.

You are viewing 1 out of 41 answers, click here to view all answers.