>>4
Oh really.
I bet you like that convenient behavior of
silently ignoring attempts to dereference null pointers to objects. That works so great, if you like spending hours tracking down an obscure bug.
I love typing
objectAtIndex,
isEqualToString, etc. all over the place to deal with things that should be intrinsic. Why the
hell does ObjC not allow any way to overload an operator? Smalltalk could do that (and quite cleanly I might add, in comparison with most other languages that allow it), so why can't its bastard child?
If
id is supposed to be a pointer type, shouldn't it be
id* instead? It's incongruous with the rest of language.
You can't have an implementation of a throwaway class without still providing the interface, even if it's
right fucking there. Why do I have to repeat myself all the time?
I love the named parameters that you can't rearrange. Why the hell give them names then? It's just more goddamn typing. The best thing is
it still compiles if you put them in the wrong order, it just gives a warning, and then merrily crashes at runtime. Hope you're paying attention to the warnings.
Which brings me to my next annoyance. Objective C programmers think this:
if (someshit = othershit) {
// do stuff
}
is somehow good style. They are
goddamn fucking retarded. -Wall complains about that, and with good reason; you practically have to disable that warning if you want to program in Objective C and not go insane.
And here's my hands-down favorite feature of Objective C:
how the living fuck do you pass a pointer to a member function? Particularly, if you want to make a table of functions, say for keybindings or something, or if god-forbid you need to call some C code that expects a function pointer. With C++, you have to pass a pointer to the function, and give the object as its parameter
[/code]. In ObjC, you need to do a bunch of cumbersome acrobatics to get at the selector's implementation method (e.g.,
[object methodForSelector:@selector(dostuff)]) -- or give up and just write a wrapper function. No wonder Apple added closures, it's the only half-sane way to do this (and it
still sucks).