4 ms·
I find it exceptionally rare to want not to use a variable that way, it's usually something you want to make harder to ignore, not easier. In the case you reall
by cosmotic 4y ago
I find it exceptionally rare to want not to use a variable that way, it's usually something you want to make harder to ignore, not easier. In the case you really do want to ignore, there are annotations to prevent the warning.
- bobbylarrybobby 4y agoThe underscore is the annotation
- cosmotic 4y agoI understand that; the problem is that it makes it so easy to bypass the safety net the warning is intended to provide. For example, not logging an exception; You'd have to be really intentional to block the warning with an actual annotation, but using an underscore would be so easy you'd just fall into a pattern of always commenting those out. It's better to have a line of code screaming "I'm doing something that looks wrong here but really it's okay" instead of "_".