-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: IDL
-
None
-
Server Programmability
Optional fields need to be set manually after construction of IDL-generated classes, which is cumbersome. Instead, IDL could generate constructor(s) that allow one to set optional arguments, perhaps through a builder API.
e.g.
auto foo = MyIdlStruct::builder(requiredArg1, requiredArg2).setOptionalArg("bar").build();
This would avoid the need to construct instances of IDL-generated classes in immediately invoked lambdas or over the course of multiple setX statements.