Live data from Hacker News

Brad Cox has died

legacy.com

141–150 of 197 posts

Re: Brad Cox has died

#141

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…

Maybe he meant classes (metaclasses)? Class itself is not typed, which definitely feels like a missing feature in the language.

Re: Brad Cox has died

#142
What a legacy. Objective-C feels like a fun toy you can play with, it really does make cool things quite easy that are really hard in most other languages, like the iOS animation system.

Re: Brad Cox has died

#143

Earlier 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++.

The fact that you can swizzle methods also says a lot about its power and flexibility. When Steve Jobs was at NeXT, he was quoted numerous times bashing C++ as having 'dead objects' while pointing out that ObjC objects were 'alive'. One seldom needs to make use of swizzling, but when you do need it, it's an awesome capability.

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

#144

Earlier 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.

To be fair I think the extent of this specialization is a branch hint

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.

Well put. The one word I would add to your description is 'pragmatic'. For many years, ObjC was the language that I would rate at the top of the pragmatic list. That stayed true for me until Nim arrived and now it's a toss-up.

Re: Brad Cox has died

#146

I 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.

Absolutely! ObjC's raison d'être was pragmatic. Brad Cox said that he didn't invent ObjC because he wanted to come up with a new language, he needed that type of language to solve the problems at hand.

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

#147

RIP. Objective-C was my first language and I enjoyed it even with manual memory management!

True! For those who might be wondering how it's even possible to enjoy working with a language that required manual memory management, I submit to you 'autorelease' and auto-release pools.

Re: Brad Cox has died

#148

This 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.

Yep, Cox's company was Stepstone.

Re: Brad Cox has died

#149

Earlier 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.

And given that C11 made them optional, Intel can just close such bug reports with won't fix using the ISO as justification.

Re: Brad Cox has died

#150
I've spent pretty much my entire career (20 years!) writing Objective-C: first for macOS, later iOS. Of course Swift is now the new kid on the block, and has lots to recommend it. But there's something about the simplicity and purity of Objective-C that has a special place in my developer's heart (despite its flaws & imperfections).

So thank you Brad, you've influenced my entire career. RIP.

Post reply on HN