3 ms·
What's so bad about this one? Other than its returning a boolean being pointless, I mean?
by krapp 13y ago
What's so bad about this one?
Other than its returning a boolean being pointless, I mean?
- lstamour 13y agoThe code doesn't return just any boolean. No, it returns the boolean it was passed. And the calling code checks the result, what, against the boolean it passed in, I wonder? I'd worry about unintended side-effects depending on the language...
- drderidder 13y agoAs 1stamour suggested the whole function was pointless. Not a big deal by itself but if you have layers upon layers of this stuff, code quickly becomes a buggy, unmaintainable mess. There are some awesome static code analysis tools like PMD and PHPMD for measuring code quality. It's not just "all programmers think everyone else's code is crap".