damirarh / damirscorner-utterances

utteranc.es comments for https://damirscorner.com
0 stars 0 forks source link

/blog/posts/20200612-ConstructingImmutableClassesWithABuilder.html #106

Open damirarh opened 1 year ago

damirarh commented 1 year ago

Imported

URL: https://www.damirscorner.com/blog/posts/20200612-ConstructingImmutableClassesWithABuilder.html

damirarh commented 1 year ago

Imported comment written by Dave Jellison on 2021-05-02T01:45:36

Probably the best explanation of the Builder Pattern that I've ever seen.

ibrahim324 commented 8 months ago

I like this approach, but how would you ensure correct ordering of method calls? One approach I've seen is to define an Interface for each stage, see: https://stackoverflow.com/questions/12212666/what-is-the-preferred-way-to-managing-order-in-the-builder-pattern but I'm interested in your take.