26 ms·
No, but "this action consumes a potentially exhaustible resource and could therefore fail" is normally part of programming language semantics
by mort96 2mo ago
No, 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.