0
\$\begingroup\$

I manage a team of Java Engineer so I have recently been exposed to the "Builder" pattern that they use. It helps when you have a large number of parameters in a constructor were a lot of the parameters could be defaulted.

I have not seen this pattern used in C++ (I suspect because we can use the named parameter list since C++20). But that does not for people on C++11/C++14/C++17 (I don't include C++03 as without move semantics it is a lot less attractive).

But I have been playing with this patten to see if it makes the code cleaner. Would it be OK question to put up a review where I present the two different techniques in the same question and get a comparative review of the techniques for the particular section.

Note: This is real code, that I am trying to write, I just want more than my opinion to weigh in on techniques.

\$\endgroup\$
1
  • \$\begingroup\$ Hey, since your answer basically is "my post is a duplicate". I hope you don't mind me hammering the question closed as a duplicate. \$\endgroup\$
    – Peilonrayz Mod
    Aug 30, 2023 at 1:47

1 Answer 1

0
\$\begingroup\$

Seems like this is already a thing.

Found the comparative-review tag.

Asked and answered: Comparing [tag:comparative-review] to a regular review

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged .