2 ms·
The details of how a stack is managed isn't normally part of programming language semantics.
by layer8 2mo ago
The details of how a stack is managed isn't normally part of programming language semantics.
- mort96 2mo agoNo, but "this action consumes a potentially exhaustible resource and could therefore fail" is normally part of programming language semantics
- layer8 2mo agoAny 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.
- mort96 2mo agoYes, 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.