11 ms·
Opinionation Incoming! Objective-C is completely irrelevant outside of Apple because Interface Builder was the killer app for Objective-C and there was never a
by KerrAvon 2y ago
Opinionation Incoming! Objective-C is completely irrelevant outside of Apple because Interface Builder was the killer app for Objective-C and there was never a version that worked well with anything except AppKit -- even UIKit has always been painful to use with it. iOS developers had to tolerate Objective-C, but no one else bothered.
It's a shame, because Foundation.framework circa 1994 was a better standard library than any other language had at the time. Many have caught up since!
Swift has many virtues outside of SwiftUI -- real static typing, functional, sophisticated generics without all the gotchas of C++ templates, complete ABI, efficient exceptions, the syntax isn't so foreign to people used to C++/Java/Rust/Ruby/Python; I could go on and on.
I've written Objective-C code for 23ish years, and I like it a lot, but no one entering the workforce cares about its remaining virtues and the language has been mostly unchanged for almost two decades.
- fao_ 2y agoWhat are it's remaining virtues? (Purely curious)
- efnx 2y agoIt’s the most widely used dialect of smalltalk and it compiles down to native code. Also it’s a superset of C and C++ so you can mix all three in a single file, for better or worse.
- deergomoo 2y agoNot OP, but it compiles orders of magnitude quicker than Swift. It also doesn’t tend to grind Xcode to a halt as the language server tries to work out what’s going on. But, in fairness, it’s a much simpler language than Swift. Which can also be a virtue.
- raydev 2y agoIf you need to be nitpicky about squeezing every last bit of performance out, then Objective-C is still useful, especially given you can just drop down to C in the same source files. I've become a big "C is bad and C lovers should feel bad" guy in recent years, but I can't ignore the "simplicity" (for some experience level definiton of simplicity) and speed of the old tools.