Replies: 2 comments 2 replies
-
This seems reasonable to me! Overall it might be good to ensure somewhat loose alignment between the API styles of |
Beta Was this translation helpful? Give feedback.
2 replies
-
(cc @yoshuawuyts) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As a follow-up to
wanted to discuss what a builder API could look like.
Here's a stab at the builder API for just the Resource type for now, based on the current API that #1580 is providing. Just jump to the end to skip the first cut at an implementation to see how the builder could let things compose in the unit test. The implementation isn't important at this point and can be reviewed/ironed-out in a new PR later on.
First order questions:
build()
or should it be more terse and perhaps always terminate with aresult(Results)
?docs
be required to come first, and just at most once, or should it append to what's already there?params(iter ..)
be the only way to specify parameters, or should one parameter at a time also be allowed with aparam((ident, Type))
method too?This version of the implementation doesn't include extra constructs that would prevent the
constructor
from havingResults
specified at compile time, but that should be easy to enforce too.Beta Was this translation helpful? Give feedback.
All reactions