|
|
|
|
|
by latchkey
1214 days ago
|
|
> felt like a clunky system to ultimately just have something automatically pass a few variables to a constructor That's exactly what it is. The benefit being that if you go with that pattern, now you have this encouraged separation of code which enables thing to be tested a lot more easily. In golang, it is super easy to just use the foo.NewFoo() pattern all over your code, but when you do that, you lose the ability to test things easily because you're no longer passing things around in constructors. |
|