I haven't looked too much at the details of the RPC protocol, but yes, the history for line 1017 indicates you were already thinking about this feature 4 years ago :)
On Sunday, June 4, 2017 at 10:31:18 PM UTC+2, Kenton Varda wrote: > > The thing is that any correct code is going to call `which()` or `isFoo()` > before calling `getFoo()`. I feel sad forcing the same check to happen > again when it's redundant in any correct code... > Yeah, I understand that completely... Is there some way to indicate an error other than throwing an exception? What I would consider dangerous here is not that the behavior is undefined, but that debug mode throws an exception (which is reasonable and lets people (or at least me :) think they can catch it) but release mode silently does something else instead. I would expect debug mode to fail noisily (e.g., terminate) for anything that is undefined in release mode. Cheers! Johannes -- You received this message because you are subscribed to the Google Groups "Cap'n Proto" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/capnproto.
