|
From: | Paul Eggert |
Subject: | Re: Dynamic modules: emacs-module.c and signaling errors |
Date: | Tue, 24 Nov 2015 23:23:37 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
Daniel Colascione wrote:
How is it any worse than checking whether open(2) returns -1?
'open' probes the outside world, and programs should be prepared for such probes to fail. In contrast, 'cons' is basic memory allocation, just as calling a function is basic memory allocation. We don't require programs to check each function call to see whether the call failed because the stack was exhausted. Similarly we don't require programs to check each call to 'cons' to see whether 'cons' failed because the heap was exhausted.
[Prev in Thread] | Current Thread | [Next in Thread] |