emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamic modules: emacs-module.c and signaling errors


From: Daniel Colascione
Subject: Re: Dynamic modules: emacs-module.c and signaling errors
Date: Tue, 24 Nov 2015 23:25:49 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 11/24/2015 11:23 PM, Paul Eggert wrote:
> 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.

I don't believe in treating memory specially. It's just another
resource. We can exhaust it just like anything else. In elisp, we have
conditions. In a module API, we have to rely on traditional error checking.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]