Live data from Hacker News

Brad Cox has died

legacy.com

111–120 of 197 posts

Re: Brad Cox has died

#111

Earlier quoted context omitted.

Coincidentally, I've been doing RE for many years, starting in the days of DOS and then moving into Windows, but it was only very recently --- less than a week ago --- that I had my first look at an app written in ObjC, and the first thing I noticed was the amount of information in the binary that seemed to almost give away most of its source: method, field, and class names everywhere. When I saw a method named somet…

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.

as i recall, `libobjc` is ~25% of app launch time. `objc_msgSend` is quite expensive when you're making hundreds of thousands to millions of calls per second.

Re: Brad Cox has died

#112

Earlier quoted context omitted.

Objective-C is a real object oriented programming language. Everything is messages. Reverse engineering ObjC as a security engineer over the years has been a treat. The runtime is a breeze to work with and the language itself made substantial usability improvements over C. It’s phased out over Swift now, but I really have no complaints over my time with the language, a rare thing in tech. I didn’t know you, Mr. Cox,…

Coincidentally, I've been doing RE for many years, starting in the days of DOS and then moving into Windows, but it was only very recently --- less than a week ago --- that I had my first look at an app written in ObjC, and the first thing I noticed was the amount of information in the binary that seemed to almost give away most of its source: method, field, and class names everywhere. When I saw a method named somet…

> these strings were actually being used by the runtime to determine what to call

Fortunately it doesn't do a full string comparison - it just compares the value of the string pointers, I understand.

Re: Brad Cox has died

#113

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/Projects/ViewBuilder/UIViewBuilderMockup/UIViewBuilderSmalltalkViewController.m:121:17: Category 'copying' does not conform to protocol 'MPWStorage'
   /Users/marcel/programming/Projects/ViewBuilder/UIViewBuilderMockup/UIViewBuilderSmalltalkViewController.m:121:17: Add stubs for missing protocol requirements

Re: Brad Cox has died

#114
post #103

Earlier quoted context omitted.

It's not about "array" or string". [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appDidBecomeActive:) name:NSApplicationDidBecomeActiveNotification object:[NSApplication sharedApplication]]; can you explain to me what any of those terms mean without looking a fairly extensive reference manual?

At that level you're talking about framework api's (in this case NextStep and derivatives), not the language itself. Drop me into some Haskell or Java or OCaml or Python or Ruby framework, I'm going to have to reach for a reference as well. It's not uncommon to conflate Objective-C conversationally with its most common use case, but Objective-C is not NextStep and other Apple-ecosystem friends.

Entirely fair.

Re: Brad Cox has died

#115

Earlier quoted context omitted.

> Having developed only one small iOS app with Objective-C code, I was mostly turned off by its overall verbosity in the context of NS prefixes. This is actually a blessing because NS-/name prefixes are a simple approach to naming that keeps you humble. If you let programmers have namespacing they will invent enterprise software frameworks where every class is six layers deep in a namespace of random tech buzzwords t…

> It implements message-based programming, which is "real" OOP No, it's message-based programming, which is a very powerful and useful tool. It's not the one true inheritor of the fundamental OOP concept. OOP wasn't defined by "you send messages to objects", it was defined by the idea that objects had their own semantics which in turn constrained/defined the things you could do with them. Some OOP languages implement…

Well, considering that Alan Kay coined the term...

Re: Brad Cox has died

#116

> On one scuba diving excursion while in the compound having lunch, Brad engaged a couple from Germany in conversation. Brad asked about the fellow travelers occupation and discovered he was a computer programmer. Lifewise, Brad was asked about his life's work and stated I am also a computer programmer. "What do you do?" Brad was asked. I wrote Objective-C. Astonished, the gentlerman said, "No, Brad Cox wrote that".…

Java also owns it to Objective-C, while it copied C++ syntax, protocols, reflection and dynamic loading come from Objective-C.

https://cs.gmu.edu/~sean/stuff/java-objc.html

And what many J2EE/JEE haters aren't aware of, it started as an Objective-C framework during the OpenSTEP days, and the OS was called Spring.

https://en.wikipedia.org/wiki/Distributed_Objects_Everywhere

Re: Brad Cox has died

#117

Very sad. I had the privilege of taking a class from him at George Mason University, and he was (unsurprisingly) very knowledgeable. He worked hard to enable software reuse. No one was interested in his idea of trying to monitor component use during runtime to pay developers. That was an unworkable approach, and I told him that then. But the general world of making it easy to reuse components is a reality today, via…

> No one was interested in his idea of trying to monitor component use during runtime to pay developers.

Apart from enterprises selling K8s components who call it 'metering'.

Re: Brad Cox has died

#118

Earlier quoted context omitted.

Thankfully, in computer science terms like "array" and "string" still mean what they did many years ago.

It's not about "array" or string". [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appDidBecomeActive:) name:NSApplicationDidBecomeActiveNotification object:[NSApplication sharedApplication]]; can you explain to me what any of those terms mean without looking a fairly extensive reference manual?

Yep.

AppKit has this concept called a Notification Center, which, duh, sends notifications. You want to observe the notification called NSApplicationDidBecomeActiveNotification. The way you want to observe this notification is by being sent the message * appDidBecomeActive:. The "object:" parameter tends to be nil, so I did actually have to look that up: it means I only want to receive this particular notification when sent by that object. It is almost certainly redundant in this case, because nobody else has any business sending NSApplicationDidBecomeActiveNotification, and it is usually precisely what you do not* want, hence it is usually nil.

Anyway:

   [prefix stringByAppendingString:suffix];
   [dictionary objectForKey:key];

In the old NeXTstep days, before our editors had code completion and other conveniences, you could very often just type a phrase describing the operation you wanted and magically the code would compile and do what you expected. Hard to both describe and probably believe if you haven't experienced it yourself.

Re: Brad Cox has died

#119

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.

as i recall, `libobjc` is ~25% of app launch time. `objc_msgSend` is quite expensive when you're making hundreds of thousands to millions of calls per second.

Although Swift has the spotlight, Objective-C keeps being improved.

"Advancements in the Objective-C runtime"

https://developer.apple.com/videos/play/wwdc2020/10163/

Re: Brad Cox has died

#120

Earlier quoted context omitted.

In the context of the time, C++ didn't exist yet. Objective-C was actually introduced just prior to C++, and both languages were effectively solving the same problem in different ways: C was the dominant language, and both language designers were trying to graft the OOP paradigm onto it. Objective-C is a thin-layer on top of C, adding Smalltalk-inspired object support. That's pretty much all there is to it. C, with s…

I'm curious--what happened to Objective-C in that fight with C++? Why didn't people go for its simplicity?

As usual, platform languages win.

C++ was born at Bell Labs and quickly integrated into their workflows as C with Classes started to get adopters.

This raised the interest of the C compiler vendors, so by the early 90's, all major C compiler vendors were bundling a C++ compiler with them.

Additionally, Bjarne got convinced that C++ should follow the same path as C and be managed by ISO, so the C++ARM book was written, which is basically the first non-official standard of the language.

So C++ had ISO, the same birthplace as C and love of C compiler vendors, while Objective-C was initial a work from a small company and later on owned by NeXT.

So, naturally Apple, Microsoft, IBM decided to go with C++, and everyone else followed.

Here is an anecdote for Apple fans, Mac OS was written in Object Pascal + Assembly, when market pressure came adopt C and C++, the MPW was born and eventually a C++ framework that mimic the Object Pascal one (there is a longer story here though, ending with PowerPlant framework).

Copland was based on a C++ framework, and Dylan team eventually lost the internal competition to the C++ team regarding the Newton OS.

Apple was one of the major OS vendors that never cared much about C for OS development, only the NeXT acquisition ended changing it. And even then they weren't sure about C and Objective-C, hence the Java Bridge during the first versions.

Post reply on HN