8 karma · joined Oct 28, 2013 (13y ago) · 7 submissions
comment 12y ago · link · parent
comment 12y ago · link · parent
comment 13y ago · link · parent
comment 13y ago · link · parent
As far as having to create a whole dummy Config for testing, that's a fair point, although the reader approach makes it easy to inject it since every reader is a function of the Config. I usually only have a small number of dependencies so it hasn't really been an issue for me. If you're mocking the dependencies each one is only one line of code, and for dependencies you don't need in the you can just use ???.
comment 13y ago · link · parent
comment 13y ago · link · parent
I do find having to add implicit parameters to every function slightly annoying, especially because when I forget, it's not always clear from the compiler error what I did wrong.