Two years ago I started writing an app in Swift. After a two year sabbatical, this was going to be my first app. When using Swift, the compiler was painstakingly slow. Because of that, I tried Objective-C and it is so clear to me that I love it. It is the best language in my humble opinion. The dynamism clicked and the modern features make it a real breeze to use. Messages are so flexible. I also love how it has “gra…
> Categories can’t formally conform to protocols I wasn't aware of that limitation, so I tried it out just now only to be certain. Works fine for me. ¯\_(ツ)_/¯ @interface UIViewBuilderSmalltalkViewController(storage) @end @implementation UIViewBuilderSmalltalkViewController(storage) @end Compiler correctly complained about the missing methods and Xcode kindly offered to add stubs for me: /Users/marcel/programming/Pro…
Brad Cox has died
141–150 of 197 posts
Re: Brad Cox has died
#142Re: Brad Cox has died
#143Earlier quoted context omitted.
I'm curious--what happened to Objective-C in that fight with C++? Why didn't people go for its simplicity?
Objective C loses to C++ for performance if you really start exploiting OOP a lot. The fact the you can swizzle methods in ObjC says a lot about the "weight" of the underlying implementation ("it's all messages") compared to C++.
As prabhatjha pointed out in another comment in this thread, swizzling was used to automatically capture networking calls just by adding our framework to your app and initializing it. You could then log into our app's web-based dashboard and see stats about networking calls (counts, latency, errors, etc.). This simple and elegant solution would not have been possible with C++. We also supported Android at the time (Java), and the developer was required to change his code to call our networking wrapper calls to get the same tracking for their Android apps.
Re: Brad Cox has died
#144Earlier quoted context omitted.
Objective-C, at least these days, is plenty fast, with a the cost of a message send being comparable to a virtual function call. The fast path of objc_msgSend is just over a dozen instructions.
The M1 chip has specialized paths on it just to make the message sending even faster. That’s part of the M1 magic.
Re: Brad Cox has died
#145:( Objective-C was the “object oriented C” that was simple and a delight to use…words that I certainly would not use to describe competing efforts. The syntax might be a little disagreeable–a concession to strict C compatibility–but the language itself is remarkably clean and, dare I say, pretty. Brad Cox struck the balance between flexibility and practicality better than almost anyone else before or since.
Re: Brad Cox has died
#146I love the quote from him where he says "languages are mere tools for building and combining parts of software." I think a lot of new developers get hung up on Language A vs. Language B (or OS A vs. OS B), so I hope this helps them realize that the languages are just tools you have in your toolbox, and that they should be open to switching between (and learning new) languages as needed.
I completely agree with your point about languages being just tools in your toolbox. With that point, I always feel that many of the folks who describe themselves as being 'passionate about language xxx' might be selling themselves short when it comes to having a toolbox that's not a one-trick pony.
Re: Brad Cox has died
#147RIP. Objective-C was my first language and I enjoyed it even with manual memory management!
Re: Brad Cox has died
#148This is Apple Objective-C right? I thought it was developed in house, didn't realize it had already existed.
It was originally developed by Cox's company in the mid 1980s, and then adopted by Steve Jobs' company NeXT in the late 1980s as the official language of NextStep. The Apple connection is only that Apple bought NeXT and that its OS X is really just a Mac-skinned version of NextStep.
Re: Brad Cox has died
#149Earlier quoted context omitted.
Yeah, because VLAs mostly suck.
I have some perfectly safe code using them that crashes Intel icc. Useful if you ever need to, I don't know, crash icc I guess. Among other things, this means icc doesn't run other compilers' testsuites, because I reported the same bug in the first release of clang and clattner fixed it right away.
Re: Brad Cox has died
#150So thank you Brad, you've influenced my entire career. RIP.