I took a look at your article and you make a lot of great points. However, I don't think it applies in all cases since default values might apply in many scenarios.
I do like the ordering of values that your implementation creates! I think it would be very compelling if an entire codebase had the exact same ordering of required values - so much easier to read.
Yes, that's exactly the point: assembling POJO's usually is the case when Builder should not be used because POJO's in vast majority of cases don't have default values. Nevertheless, Fluent Builder can be modified to handle case when some values have defaults. And only in case when all values have defaults traditional form of Builder can be used.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey Sergiy. Thanks for the reply.
I took a look at your article and you make a lot of great points. However, I don't think it applies in all cases since default values might apply in many scenarios.
I do like the ordering of values that your implementation creates! I think it would be very compelling if an entire codebase had the exact same ordering of required values - so much easier to read.
Thanks again.
Yes, that's exactly the point: assembling POJO's usually is the case when Builder should not be used because POJO's in vast majority of cases don't have default values. Nevertheless, Fluent Builder can be modified to handle case when some values have defaults. And only in case when all values have defaults traditional form of Builder can be used.