Thoughts about primary constructors: 3 pros and 5 cons - Andrew Lock
Thoughts about primary constructors: 3 pros and 5 cons - Andrew Lock
andrewlock.net Thoughts about primary constructors: 3 pros and 5 cons
In this post I describe some of the ways I like to use primary constructors and some of the things I don't like about them
![Thoughts about primary constructors: 3 pros and 5 cons](https://programming.dev/pictrs/image/5edf3a79-2285-4854-8189-e4fb96cede9d.png?format=webp&thumbnail=256)
You're viewing a single thread.
View all comments
0
comments
For dependency injection there's no need to store them in fields. You can just access them directly.
I find it cuts a huge amount of boiler plate if done this way.
1 0 Reply