Closed ecorm closed 9 years ago
If an optional "details" parameter is added to Client operations, the combination of optional parameters will result in many overloads. For example:
Client
call(procedure, handler); call(procedure, args, handler); call(procedure, details, handler); call(procedure, args, details, handler);
The above overloads could be replaced by a single fluent API:
call( Rpc("foo") .withArgs({42}) .withKwArgs({{"bar",false}}) .withBlacklist({12345678}) .andDiscloseMe(), handler );
This mechanism might also be used to unify the CoroClient and CoroErrcClient APIs under the same class.
CoroClient
CoroErrcClient
If an optional "details" parameter is added to
Client
operations, the combination of optional parameters will result in many overloads. For example:The above overloads could be replaced by a single fluent API:
This mechanism might also be used to unify the
CoroClient
andCoroErrcClient
APIs under the same class.