Hacker News new | past | comments | ask | show | jobs | submit login

I've had to use conditional compilation quite a few times. Often due to strange things like target architecture and things like that. I noticed my native iOS stuff runs lightning fast, though. So think like you are writing souped up C code. You have to put up with header files and macros and conditional compilation sometimes for different versions of the app or to run on simulator architecture vs. real, etc. but it is very efficient building and running.

Categories can be nice to avoid subclassing. Subclassing can become a nightmare when one controller extends another which extends another which extends the Google Analytics one. There's so much hidden behavior and you can't even easily disable the log spamming Google Analytics one easily. Not compiling in the init code gives you errors in the log all over.




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

Search: