There is one feature of the Objective C language that I really love: the method naming. Let me explain with an example.
Here is a nasty call to a C function from the Win32 API that has 12 arguments:
hwnd = CreateWindowEx(WS_EX_LAYERED, TEXT("Hello"), TEXT("World"), WS_OVERLAPPEDWINDOW, 10, 10, 400, 400, NULL, NULL, hInstance, NULL);
Pick an argument, any argument. What does it do? You can probably guess a couple of them, but basically you’re forced to look up the documentation. Sure, 12 arguments is a bit excessive, but even three or for argument functions can be ambiguous. What if you’re trying to understand a function call that is being passed three number literals as arguments? Even if you know the function, you’ll probably have to look up the documentation just to remember the order of the arguments.
Now for the equivalent in Objective C:
Read full post →