I see that I misunderstood while reading :")
Could you show what kind of issues appear due to immutability?

As for my suggestion, I'm thinking of using @Builder alongside
@NoArgsConstructor. This means ditching the existing constructors and
updating other files to use the Builder approach instead of the
constructors.

Do you see any red flags with this plan?

Regards,
Zeyad

On Wed, Mar 20, 2024 at 1:05 AM Ádám Sághy <[email protected]> wrote:

> Hi
>
> Based on the doc you shared Builder was not dismissed, only
> immutability...to a later stage.
>
> My understanding was that you could move forward with Builder pattern but
> also these Data/DTO shall have setters as well...for now.
>
> Am I missing something?
>
> Regards,
> Adam
>
> Sent from my iPhone
>
> On 19 Mar 2024, at 23:30, Zeyad Nasef <[email protected]> wrote:
>
> 
> Hello, devs.
>
> I've observed that there are several parameterized constructors within the
> same class, each differing in the parameters they accept.
>
> Since Lombok is already set up, why not streamline these constructors by
> using the *@Builder* annotation instead?
>
> I reviewed the following doc
> <https://docs.google.com/document/d/1w23pvpbWmWZVQUOKXcC_0zjfs-T1bSAagkW-XG2kgxE/edit?disco=AAAAZ5PWsLk>
>  which
> suggested using it but it has been dismissed due to some immutability
> issues happening in the service layer, which I don't fully understand :(
>
> If there are any suggestions I would like to hear from you.
>
> Thanks,
> Zeyad
>
>

Reply via email to