by fuzzzerd · 8mo ago · 0 comments
If you are only looking at the call site, sure that could be confusing, but if you are looking at the definition as provided in your post, surely anyone that is able understand the concept of a function can see the problem?
I'm not arguing they don't exist, sure they do, but I'm confused as to how you came up with it as a litmus test? Is it that common?
Surely we can agree in a real scenario renaming it (or fixing implementation to match name) is likely appropriate, but to completely miss the error?
Hope this comes across as curiousity, because I am curious about this one from your list in particular.
But I think if someone already is comfortable with working with abstractions such as "function" the thing is trivial, so it's a bit of a weird litmus test.
I think anyone that can understand a function can understand this, but one might not be happy accepting it's the case, and endeavor to change it.
I think it can be easy to lose sight of that distinction, and eagerness to fix it can be confused with not accepting it could be, but is also probably wrong.