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

> Lastly, neither has generic types.

Not true anymore; ObjC has generics with type erasure. (But not all the cases can be exported to Swift.)

> Instead, Objective-C has nil, which is like null except it won’t stop the program when you accidentally use it.

That's… not quite right… but I guess he has the visible effects down. Anyway, ObjC has nullability annotations now for this.

> For example, in Objective-C many objects have both a “core foundation” form and a “new style” “NeXTSTEP” form

This is not legacy baggage, it's an intentional C bridge.

> This is justified by conventions strongly favoring you not catching exceptions, and apparently the speed benefits are non-negligible, but it still blows my mind that Apple has their language default to incorrect behavior.

He shouldn't use ARC+exceptions, because Cocoa itself is not exception-safe. Just quit the app if you get one.



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

Search: