Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> It is easy to generate mock implementation code

Not in any reusable way. Take a look at mockgen and testify: All they do is provide a mechanism to push implementation into being defined at runtime by user code. So, if they, or something like it, is in use the implementation is still necessarily there for all to see.

> Also, the original author of the function that consumed the apparently unnecessary interface type may have intended to test it

Okay, sure, but this is exactly what the commenter replied to was talking about initially. What is a repetition of what he said meant to convey?

> That means the discussion may be broader than just what one person contributes to it.

Hence why we're asking where the relevance is. There very well may be something broader to consider here, but what that is remains unclear. Mocking in and of itself is not in any way interesting. Especially when you could say all the very same things about stubs, spies, fakes, etc. yet nobody is talking about those, and for good reason.

> If this offends you

For what logical reason would an internet comment offend?



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: