3 ms·
Why is Objective-C so unsafe? From what little I know about it, I see no reason why it should be less safe than, say, Smalltalk. If Objective-C is the second-
by s-phi-nl 17y ago
Why is Objective-C so unsafe? From what little I know about it, I see no reason why it should be less safe than, say, Smalltalk.
If Objective-C is the second-least safe language, what is the least safe language?
- tptacek 17y agoSmalltalk is garbage-collected. ObjC deals in raw memory addresses. It's actually less secure than C, as I see it.
- allertonm 17y agoThis doesn't affect your point, since ObjC does still deal in raw memory addresses, but it has supported garbage-collection since Objective-C 2.0 (i.e since Leopard/10.5)
- tptacek 17y agoYeah, I need a better term for high-level-language than "garbage collected" (I do some Cocoa dev in my spare time, and I do like being able to ignore reference counting. Oh! Reference counting! Another security weakness with Cocoa.)
- boucher 17y agoNot sure how you reach the less secure than C conclusion, unless your claim is that the Cocoa frameworks specifically have a lot of security holes.
- tptacek 17y agoNot so much Cocoa's code quality as the worst-of-both-worlds situation it's in with exposure to crappy C code and a very dynamic runtime that is basically impossible to lock down ASLR and W^X-style.