Skip to main content

Is there another argument for using Builders instead of the "old way"?

"When you have a new hammer, everything will look like a nail." - thisThis is what I thought when I read your question.

If I waswere your coleaguecolleague, I would ask you "why, "Why not initialize the whole object in the constructor?" That is what it is, it's functionality after all. Why use the builder (or any other design) pattern?

Is the change I propose even really worth it?

It is difficult to tell from that small code snippet. Maybe it is - you and your coleagues needscolleagues need to evaluate it.

Do you have any tips for better presenting such arguments when advocating trying something new?

Yes, learn more about the topic before discussing it. Arm yourself with good arguments and rationales before entering the discussion.

Is there another argument for using Builders instead of the "old way"?

"When you have a new hammer, everything will look like a nail." - this is what I thought when I read your question.

If I was your coleague, I would ask you "why not initialize whole object in the constructor?" That is what it is it's functionality after all. Why use the builder (or any other design) pattern?

Is the change I propose even really worth it?

It is difficult to tell from that small code snippet. Maybe it is - you and your coleagues needs to evaluate it.

Do you have any tips for better presenting such arguments when advocating trying something new?

Yes, learn more about the topic before discussing it. Arm yourself with good arguments and rationales before entering the discussion.

Is there another argument for using Builders instead of the "old way"?

"When you have a new hammer, everything will look like a nail." - This is what I thought when I read your question.

If I were your colleague, I would ask you, "Why not initialize the whole object in the constructor?" That is what it is, it's functionality after all. Why use the builder (or any other design) pattern?

Is the change I propose even really worth it?

It is difficult to tell from that small code snippet. Maybe it is - you and your colleagues need to evaluate it.

Do you have any tips for better presenting such arguments when advocating trying something new?

Yes, learn more about the topic before discussing it. Arm yourself with good arguments and rationales before entering the discussion.

Source Link
BЈовић
  • 14k
  • 8
  • 63
  • 82

Is there another argument for using Builders instead of the "old way"?

"When you have a new hammer, everything will look like a nail." - this is what I thought when I read your question.

If I was your coleague, I would ask you "why not initialize whole object in the constructor?" That is what it is it's functionality after all. Why use the builder (or any other design) pattern?

Is the change I propose even really worth it?

It is difficult to tell from that small code snippet. Maybe it is - you and your coleagues needs to evaluate it.

Do you have any tips for better presenting such arguments when advocating trying something new?

Yes, learn more about the topic before discussing it. Arm yourself with good arguments and rationales before entering the discussion.