News for hackers. Stuff that matters.
Re:Avoid Indirection in Code by justasitsounds on Monday June 24, 2019 @12:43AM (#20260617)
In this case the desired functionality can be encompassed in a single standard library method.

However, the author of the code may have started with a much more complex implementation but still feels like `is_foolike()` is better at describing the _intention_ of the method than the eventual implementation.

Replacing the descriptive method name with the actual implementation may mean the author now feels that they have to append a non-functional comment to explain that in order to test for foo-ness one only needs to do a simple string-prefix match.

Re:Avoid Indirection in Code by james_s_tayler on Monday June 24, 2019 @12:50AM (#20260640)
You know how many times I've seen that exact scenario in code bases? Plenty. Some developers just do really pointless shit and then name is terribly to add insult to injury.
Re:Avoid Indirection in Code by DonHopkins on Monday June 24, 2019 @05:43AM (#20261836)
Especially if your name is Ike and you don't appreciate being called a fool.