Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My favorite are the function documentation in some of Apple's headers.

Apple's CoreFoundation always irked me because it didn't do NULL parameter testing. Try to CFRelease(aNullObject)? You crashed, son.

I asked one the of the CF engineers about this and I was told it was a performance thing. (I can kind of see that ... caller tests that the CFCreateFoo() did not return NULL and then can make any number of subsequent calls without having to re-sanity-check that value.)

Regardless, look out for Apple headers with documentation comments similar to:

    If properties parameter is NULL returns false, does not crash like CoreFoundation.
Not cursing, but what can you do in public headers...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: