pancakes

I have been getting the error “stack too deep” in Ruby for months now. I never new what it meant until this morning when studying JavaScript. When a function is called, it must remember its context in order to execute properly. The context is stored in that “stack.” If another function is called inside a function, its context must also be thrown on top of the stack. Contexts, like pancakes, will be added on top of one another. Only when a function returns will its context be taken off the stack. Because the stack requires memory, if too many functions are called within a parentFunction, the computer will get into a recursive K-hole and throw an error like “maximum call stack size exceeded” or “go to hell i am tired.”

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s