logoalt Hacker News

IshKebabtoday at 9:44 AM1 replyview on HN

Typo in this case, but in general supporting "useless" code like this is sometimes a good idea because it makes writing generic code easier. Maybe not in this case.


Replies

bluGilltoday at 11:31 AM

The counter is useless code often is a sign of a bug. Possibly someone started implementing something and then failed to finish it. I often want my compiler to warn on useless code.

show 1 reply