4 ms·
Call stacks help form a mental model for some people. It’s a way to help get an initial grip on the topic, one of many. Teaching usually involves many simplifie
by plasticchris 2y ago
Call stacks help form a mental model for some people. It’s a way to help get an initial grip on the topic, one of many. Teaching usually involves many simplified models which in my experience helps a lot with initial understanding.
- kazinator 2y agoWe don't need detailed call stacks to help with understanding recursion. Just the somewhat more abstract concept of a procedure/function activation. Calling a function suspends the caller and create a new activation for the callee. When the callee returns, it's activation is disposed and suspended color resumes in its original activation.
- plasticchris 2y agoThe point was pedagogical, sometimes the “best” explanation just doesn’t work for a student. Some might get confused about where the state of the caller goes and get hung up.
- deleted 2y ago[deleted]