6 ms·
A Short History of Objective-C (2017)
- Normille 5y ago2017 --please put the date in the title when posting archaeology!
- Groxx 5y agoJust to reply to downvoters, since this was negative when I saw it: title has been changed! And I wholly agree, >1-2 years old deserves a year marker. Sometimes I wish that this field didn't change so much, but sometimes I rejoice that it does.
- vbezhenar 5y agoWhat changed in Objective C since 2017?
- marvel_boy 5y agoBelieve it or not. But Objective-C continuous to evolve. It is not a dead language.
- pjmlp 5y agoTo your downvoters, Metal is actually implemented in a mix of Objective-C and C++, even though most examples use Swift.
- flohofwoe 5y ago...and to be honest, Swift doesn't bring much to the table when just glueing macOS frameworks together (and that's what most macOS applications actually do). Such code is completely dominated by the (quite verbose - both in ObjC and Swift) framework calls.
- pjmlp 5y agoI actually enjoy not having to type []@ all over the place. :)
- saagarjha 5y agoTwo off the top of my head: direct calls and constant literals.
- pjmlp 5y agoBasically performance tuning, extended ARC use cases, and better Swift interoperability. "What's New in LLVM" https://developer.apple.com/videos/play/wwdc2018/409/ https://developer.apple.com/videos/play/wwdc2018/409/ "Advancements in the Objective-C runtime" https://developer.apple.com/videos/play/wwdc2020/10163/ https://developer.apple.com/videos/play/wwdc2020/10163/
- deleted 5y ago[deleted]
- zer0zzz 5y agoObjC is more dynamic than people think. See things like swizzling and non-fragile instance variables. ObjC object orientation is closer to what folks on Java and C# consider the job of reflection.
- kryptiskt 5y agoThere was a paper on Objective-C in the last HOPL conference for those who want something meatier: "The origins of Objective-C at PPI/Stepstone and its evolution at NeXT" https://dl.acm.org/doi/10.1145/3386332 https://dl.acm.org/doi/10.1145/3386332
- _ka_ 5y agoAnd the short story is not end, there is a very good cross cross platform implementation for Objective-C that runs at Linux,Windows,OSX,Haiku-OS and so on... And is very active in development. :D https://objfw.nil.im https://objfw.nil.im
- mucholove 5y agoWould love to hear more about this. I use GNUstep and follow MulleObjC. So 32 bit platforms is the goal??? Can you make a list of like top 10 reasons to use ObjFW instead of Foundation?
- jimmaswell 5y agoDoes anyone really want to use it outside iOS?
- setpatchaddress 5y agoSure. If you want a SmallTalk that you can use to build real apps, ObjC is your best choice.
- igouy 5y agoIf you want a Smalltalk that you can use to build real apps, Smalltalk is your best choice. https://pharo.org/success https://pharo.org/success
- mucholove 5y agoYes. I actually fell in love with it. I began to learn iOS and Swift because that's the kind of computer I owned. Along the way I began to learn about how Swift relies heavily on the Objective-C runtime and began to dig in. The flexibility to me is amazing. Love it. Incremental typed languages are by far my favorite.
- setpatchaddress 5y agoTwo red flags: - the exception philosophy seems wrong-headed to me — you want to build language features that encourage handling of routine runtime issues without the overhead of C++-style exceptions - the claim that the runtime is faster than Apples’s runtime is very citation-needed
- NelsonMinar 5y agoThis history stops in 1995 which is right about when I started using Objective C for Swarm, an agent simulation system. We may have been the only major non-NeXTstep user of Objective C at the time. GNU Objective C was a key enabler for us; without it we couldn't have used it. We picked ObjC over C++ because it was so much smaller and simpler. Also reflective, at the time it was very hard at runtime to learn anything about a C++ type. It was a pretty good match for our needs at the time. tclobjc also helped a lot because it let us use Tk for the GUI.
- AndrewStephens 5y agoI am a C++ guy but I dabbled in Obj-C for a while. I think my progression was similar to a lot of people: 1) Uggh, this language sucks. What's with all the [] everywhere? Why are the parameter names included in the signature? Why are allocation and initialization separate operations? This is a joke. 2) Hold on! You can replace methods at runtime? You can swap out implementations on the fly? Calling methods is incredibly flexible yet also optimized up the wazooo? 3) Wait a minute! You can call methods by name at runtime? Even from dynamically loaded libraries? I always thought Windows COM sucked, now I understand how much better it could have been. This is the best language ever! I haven't done any ObjC for years but sometimes I miss its flexibility. It wasn't all roses, sometimes lifetime management was a pain for instance, but ObjC doesn't deserve its reputation as a weird, unloved language.
- kitsunesoba 5y agoObj-C's flexibility is great, but it's also one of the language's weaknesses. Having worked on Apple platform projects for over a decade, I've seen some truly insane Obj-C code — bad casting, no null checks, and a variety of different types of incidentally working but incorrect code, among other things. It's a wonder that some of those projects ran at all. But I suppose that's down to the skill of the developer more than it is the language itself. In the right hands, Obj-C is powerful for the same reasons… the compiler gets out of your way and lets you write.