Open ElykDeer opened 1 year ago
IMO recommending build()
as a default is fine, if you can't think of any other name. I agree with you that clarification about this is good, e.g. a note that says something like that build()
is used in the example, but if your API supports it to choose a better name, same as the API Guidelines say about the name of the builder type.
The current builder design pattern implies that the method the produces whatever is being built should be named
build()
, which seems to contradict the Rust API Guidelines on the same subject.I think there should be some clarifying language around this: whether the method should always be named
build()
, or be adapted to fit the API.