Indeed, the comments allude at this possibility (note the TODO):
https://github.com/capnproto/capnproto/blob/77f20b4652e51b5a...
But in practice, the only kind of "script" we support currently is following a chain of named fields followed by invoking a new RPC method, unconditionally, as in:
fooResult = cap.foo();
quxResult = fooResult.bar.baz.qux();
This seems to satisfy the vast majority of real-world use cases.I would only add other operations if I identified some use case where it turns out to be a really big performance win. So far I haven't seen any.