Comment on [help]Question regarding Builder design patter.

marsara9@lemmy.world ⁨1⁩ ⁨year⁩ ago

So the builder pattern is supposed to solve the problem of: if you have a large number of optional fields that may or may not need to be set to construct your object. Then once the dev has called all of the setters that they require, they call build to fully realize that object.

Some rules that all builders should follow:

source
Sort:hotnewtop