Skip to content

Instantly share code, notes, and snippets.

@mikeash
Last active August 29, 2015 13:57
Show Gist options
  • Save mikeash/9473989 to your computer and use it in GitHub Desktop.
Save mikeash/9473989 to your computer and use it in GitHub Desktop.
void f(void) {
char *CArray[] = { // correct!
"a",
"b",
"c"
};
CGRect CInitializer = { // correct!
.origin = {
0,
0
},
.size = {
42,
42
}
};
id CBlockArray[] = { // not bad!
^{
printf("x");
},
[1] = ^{
printf("y");
}
};
NSArray *ObjCArray = @[ // insane!
@"a",
@"b",
@"c"
];
NSDictionary *ObjCDictionary = @{ // insane!
@"a" : @"b",
@"here's a nested dictionary, which gets even crazier" : @{
@"wat" : @"seriously"
},
@"now we're over here?" : @"why?",
@"let's try a nested array" : @[
@"at least it's mildly consistent",
@"sorta"
],
};
NSArray *ObjCBlockArray = @[ // WAT
^{
printf("x");
},
^{
printf("y");
}
];
}
@jesseSB
Copy link

jesseSB commented Mar 10, 2014

It's just frustrating because the team developing Xcode are also using it and seeing this crap too and just not fixing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment