0

Who can explain why in Objective-C sometimes are used this to my mind strange variable names like

NSArray * _sushiTypes;
NSString * _lastSushiSelected;

or sometimes

NSArray * sushiTypes = _sushiTypes;
NSString * lastSushiSelected = _lastSushiSelected;

Is there any necessity for this?

iPatel
  • 43,583
  • 14
  • 113
  • 135
ShurupuS
  • 2,913
  • 2
  • 23
  • 43
  • 1
    Some people think that it's cool. They're wrong. That's it. (Also, you have to distinguish between local and instance variables - this is a valid convention in the case of instance variables in order to denote them being private.) –  Mar 29 '13 at 06:03
  • OK, thank u guys! My En is not perfect so I don't now the name of this symbol "_" in English to find the correct question) – ShurupuS Mar 29 '13 at 06:12
  • 1
    @ShurupuS The `_` symbol is called the "underscore". – rmaddy Mar 29 '13 at 06:19

0 Answers0