Consider this in the (possibly nested) scope of a method (function, block, etc.):
int _ = 42;
Are there any technical reasons to avoid a local variable named _
?
Some guidance, for the purpose of this question:
- I know
_
generally prefixes Objective-C instance variables. Leave that aside. Commentary on other clashes with convention welcomed. - I like pretty code too, but statements of taste or pure opinion (e.g. "It's {confusing, unreadable, unmaintainable}") are strongly discouraged here†.
- I'm primarily interested in answering this for Objective-C, but answers related to C or C++ are also encouraged.
† Buy me a pint, and you can tell me all about it. :)