FunctionalOpossum@programming.devtoProgramming@programming.dev•Elixir vs Go: what to learn in 2024
1·
1 year agoWhat’s your background? I’ve mainly used language with huge standard libraries and Go’s intentionally small standard library feels very unergonomic sometimes (I miss sets).
Elixir feels very ergonomic to me, but a lot of programmers struggle with the lack of typing.
The general idea is to not test things that need to be mocked, keep all logic out of those and keep them at the edges of the application. Then you test the remaining 90% of your code which would ideally be pure functions that don’t need mocks .
The remaining 5% can be integration tests which doesn’t care about DI.
In reality this doesn’t always work, because sometimes it’s better to write a complex query with logic and let your database do the processing.