3 ms·
> I hope you see the irony in using “you’re holding it wrong” here? Not really. If you use a hammer on a screw, is it the hammer's fault? Sounds like the code
by sph 3y ago
> I hope you see the irony in using “you’re holding it wrong” here?
Not really. If you use a hammer on a screw, is it the hammer's fault? Sounds like the code base you are working on is badly-organised, rather than Mox being the root of all evil. There are far too many stories of people picking up Elixir and coding in it as if it were Python or Ruby. You cannot base your experience with it on a codebase written by people new to functional languages.
And no one forces you to use Mox, anyway. It's far from being a core Elixir component. It is just one implementation of the mock object pattern that comes on a standalone, optional library.
> Mox is nothing more than a kludge to get around the limitations of the language
Mocks are not an Elixir invention, and exist in pretty much all languages.
https://en.wikipedia.org/wiki/Mock_object https://en.wikipedia.org/wiki/Mock_object
- sarchertech 3y ago“You’re holding it wrong” was a response from Steve Jobs blaming users for a design flaw. >Mocks are not an Elixir invention I have no problem with Mocks, I have a problem with Mox. Mox is the kludge, not Mocks in general.