Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Private / public constructors in DTO coherence #9

Open
darkspock opened this issue May 4, 2022 · 0 comments
Open

Private / public constructors in DTO coherence #9

darkspock opened this issue May 4, 2022 · 0 comments

Comments

@darkspock
Copy link

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.

@darkspock darkspock changed the title Private / public constructors in DTP coherence Private / public constructors in DTO coherence May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant