Re:Learning a new language, or how I gained familiarity with Go
by latchkey on Wednesday August 17, 2022 @07:27PM
(#32503148)
As you refactor the code to be more testable, you can add in fx. It doesn't have to be from the beginning.
[ Parent
| on HN ]
Re:Learning a new language, or how I gained familiarity with Go
by randomdata on Wednesday August 17, 2022 @07:43PM
(#32503306)
If you refactor code to be more testable then it is testing that is forcing you, not fx.
Re:Learning a new language, or how I gained familiarity with Go
by latchkey on Wednesday August 17, 2022 @11:33PM
(#32504956)
Correct, I haven't argued any differently. You introduce fx in, start writing tests and it will convince the other developers you're working with that there is importance to how you build the codebase in such a way as to enable testing.
Re:Learning a new language, or how I gained familiarity with Go
by randomdata on Thursday August 18, 2022 @04:43AM
(#32506919)
Then you must have mistakenly replied to the wrong thread? If you are in a position where you can introduce fx, then you are also in a position to introduce testing, and testing will already force testable code. If fx can help your code, great, but that's orthogonal to the discussion.