This seems like a dumb question, but I’ve been unable to find an answer.
Does the RPC system support null values? In particular, if an RPC method returns an interface, is it able to return null?
Say Widget is an interface, and in another interface I’ve got a method
widgetNamed @1 (name: String) -> (widget: Widget);
Can this method return null? I’m beginning to suspect it can’t, because when it tries to I get an error "Pipeline call on a request that returned no capabilities or was already closed”. (The implementation is in C++; to return null it just abstains from calling context.getResults().setWidget().)
If it can’t, what is the idiomatic way to provide an optional return value? Do I return an exception, or do I create my own `Optional` type as a union?
—Jens