Open ikrivosheev opened 3 months ago
Builder pattern, It's worth considering! However, I think we should be cautious in its implementation because there are several ways to implement the builder pattern—such as having methods consume ownership or return references—and different people have different preferences. so I'm a bit cautious about introducing it.
Whether to actually introduce the builder pattern is another matter, but I envisioned something like an XzDecoderBuilder::new().filter().build()
. Do you have a more specific image in mind?
Well, I'll try to make a draft with examples of using.
Hello! I have an idea. Now my code looks something like this:
I think using builder pattern will improve user experience.