4 ms·
Because ObjC is a strict superset of C in the technical sense. That is: every valid C program is also a valid Objective-C program. Of course idiomatic ObjC is
by armadsen 6y ago
Because ObjC is a strict superset of C in the technical sense. That is: every valid C program is also a valid Objective-C program.
Of course idiomatic ObjC is heavily tilted toward the non-C parts of the language (OOP features), but that doesn’t mean it’s not a true superset of C.
- PaulDavisThe1st 6y ago"Yes! C++ is nearly exactly a superset of Standard C95 (C90 and the 1995 Amendment 1). With very few exceptions, every valid C95 program is also a valid C++ program with the same meaning." https://isocpp.org/wiki/faq/c https://isocpp.org/wiki/faq/c
- saagarjha 6y agoObjective-C has no exceptions.
- grzm 6y agoWhaddya mean? @try { // do something that might throw an exception } @catch (NSException *exception) { // deal with the exception } @finally { // optional block of clean-up code // executed whether or not an exception occurred } https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/ErrorHandling/ErrorHandling.html#//apple_ref/doc/uid/TP40011210-CH9-SW3 https://developer.apple.com/library/archive/documentation/Co... (I'll see myself out. For at least two reasons.)
- pjmlp 6y agoWe are on C17 nowadays.