back

by layer8·5d ago·view on hn ↗
The details of how a stack is managed isn't normally part of programming language semantics.
1 comments
No, but "this action consumes a potentially exhaustible resource and could therefore fail" is normally part of programming language semantics
Any function call can fail due to resource exhaustion (unless the language specification includes a mechanism to guarantee success, which hardly any language does). The specifications of the semantics of a programming language are usually silent on the behavior of programs under such resource failures; it’s outside of what is specified.
Yes, any function call can fail due to resource (i.e stack space) exhaustion. Other things, like integer addition or a while loop, can not. This is semantically relevant.