New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Whether to maintain both builder and non-builder patterns #60
Comments
I'm personally in favor of the builder pattern 👍 |
👍 |
I also think that the builder pattern is a traditional Rust design pattern that works well with Default. |
I think the question is whether or not to continue to maintain both the builder and non-builder patterns. If the maintenance cost seems high, I am in favor of maintaining only the builder pattern. |
Is the switch to the builder pattern a huge change for youki? The main reason to not make it a default was the backwards compatibility. Anyway, I’m happy to make it default if we agree on it and remove the unnecessary code paths. |
I didn't feel it was too much trouble to maintain both so far, so I would be in favor of keeping it as it is for now. |
Perhaps the fact that fields are separated by private or public is lightly troublesome when writing tests. To be honest, I also think both can be maintained, but I think there will be some surprise for new contributors. |
I think there are two issue at hand here. One is whether to use builder pattern and if switch to builder pattern is hard for Youki. I think the current agreement is we like the builder pattern and it is not hard for Youki to integrate (at least we can commit to make the change). The second issue is if we want to maintain two versions and as a result potentially have duplicated code. As a principle, I don't like this and this may become hard to maintain in the future. With that being said, as a practical matter, I can see the argument that it is maintainable at the moment. I would favor keeping the builder version only if backward compatibility for Youki is the only concern. Otherwise, I would propose that we be disciplined and limit this repo to only the spec definition and a handful of utility functions such as load and save. |
In favor of keeping one, anyone is OK. |
Fixes containers#60 Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
Proposing the change in #61 |
No description provided.
The text was updated successfully, but these errors were encountered: