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

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.



"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


Objective-C has no exceptions.


Whaddya 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/Co...

(I'll see myself out. For at least two reasons.)


We are on C17 nowadays.




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

Search: