Re:Most Pressed Keys and Programming Syntaxes
by k-mcgrady on Thursday July 12, 2012 @05:30AM
(#4233739)
I found the Objective-C one strange too. I would have thought '[' and ']' would have been two of the most pressed keys. I only really use '/' for commenting.
[ Parent
| on HN ]
Re:Most Pressed Keys and Programming Syntaxes
by dan1234 on Thursday July 12, 2012 @08:10AM
(#4234133)
I do type a lot more square brackets in ObjC than any other language, but I find that I type a lot more generally due to the increased length of many method names in ObjC (or I would do if autocomplete didn't do it for me).
(Simple) Example:
PHP:
$myString = sprintf('Total: %.2f', $myFloat);
ObjC:
NSString *myString = [NSString stringWithFormat:@"Total: %.2f", myFloat];
Maybe this is the reason these characters don't score too highly in overall frequency? I have no answer for the high frequency of '/'.