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

Unfortunately, much of the Apple sample code is also pretty terrible.

Here's one heuristic: if you see any Objective C++ files (*.mm) in the project, you can probably ignore it as an example of good style.




Disagree. Some good libraries are C++, so linking to them requires you to use Obj-C++ (at very least, changing the name to *.mm).


Yeah, I meant things like sample code for plain C frameworks, where the author has just decided "hey, why not do this in Obj-C++ instead of Obj-C." As I recall, many of the AudioToolbox examples are like this.

Didn't mean to imply that there's no place for Obj-C++, just that it's not good style if you don't actually need it (like to wrap a C++ lib).


The number of iOS examples using Objective-C++ is pretty minimal, IIRC.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: