You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the example PostCheepCommand, you use a private constructor, in SignUpCommand a public constructor, later a named constructor.
I know the reader should know the difference and when to use it, but is confusing to follow the examples this way.
I think should explain the benefits and tradeoff of fromArray, because in the example is contrary to the phrase in the same chapter "It will also add type safety and IDE assistance, too."
Filling from array is not type safety and the IDE can not help.
The text was updated successfully, but these errors were encountered:
darkspock
changed the title
Private / public constructors in DTP coherence
Private / public constructors in DTO coherence
May 4, 2022
In the example PostCheepCommand, you use a private constructor, in SignUpCommand a public constructor, later a named constructor.
I know the reader should know the difference and when to use it, but is confusing to follow the examples this way.
I think should explain the benefits and tradeoff of fromArray, because in the example is contrary to the phrase in the same chapter "It will also add type safety and IDE assistance, too."
Filling from array is not type safety and the IDE can not help.
The text was updated successfully, but these errors were encountered: