[getdns-api] getdns_return_t for destroy methods
paul.hoffman at vpnc.org
Sun Mar 9 01:02:20 MST 2014
On Mar 9, 2014, at 1:48 AM, Goyal, Neel <ngoyal at verisign.com> wrote:
> Not dense at all! In fact, you're right on point. Basically, a return code will enforce our ability to tell them "don't do that". We can't control how a user is going to use our API, or when they'll make the necessary calls, so we just want to cover our bases and let them know they're doing something wrong in a way that doesn't result in a crash.
Ah, that wasn't clear.
The folks who did the original design explicitly asked that any function that has no return information use "void". I hear you asking for a possible return action of "you're hosed and are probably about to die unless your code can recover from this". I would tend to believe that "void" is much clearer semantically. If you really want your return code, I would want to first see how you would document it. I suspect that your documentation will be confusing, but am open to listen.
More information about the getdns-api