Live data from Hacker News

Brad Cox has died

legacy.com

171–180 of 197 posts

Re: Brad Cox has died

#171
post #149

Earlier quoted context omitted.

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.

Not if it claims GCC compatibility, which it does. Though I believe the frontend is licensed from EDG anyway.

Re: Brad Cox has died

#172
post #132

Earlier quoted context omitted.

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.

The compiler does some very fancy stuff with objc_msgSend to make it fast, and the selectors are interned. https://www.mikeash.com/pyblog/objc_msgsends-new-prototype.h...

Objective-C had an IMP pointer, essentially a function pointer. If you needed to send a message to an object in a tight loop, you could extract the pointer before the loop and use it inside.

Re: Brad Cox has died

#173
post #109

> 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".…

I wonder what objective-c would look like with the square brackets turned into parenthesis...

Would probably look a little less sharp...C-flat?

Re: Brad Cox has died

#174
post #161

Earlier quoted context omitted.

> Apple was one of the major OS vendors that never cared much about C for OS development It's true that MacOS Classic kept providing Pascal headers for most of its APIs for a long time (I don't recall whether they ever stopped), but internally, they started switching to C by the late 1980s (as an external developer, I could tell by one bug which would never have made it through a Pascal compiler, but was typical for…

I bet it was actually C++ with extern "C", which was my point, specially given the MPW and PowerPlant frameworks. I never knew anyone doing bare bones C on classic Mac.

There was a lot of extern "C" (and there still is a lot of that), but there also was a lot of extern "Pascal" back then, I seem to recall.

There was a quite a bit of regular C in classic MacOS, though there was also a good deal of C++. You're right that MacApp (Which I think is what you're referring to with "MPW", which was an IDE) and PowerPlant were written in C++, but I'm not talking about the clients of the MacOS APIs, but about the implementations of those APIs.

Re: Brad Cox has died

#175
post #161

Earlier quoted context omitted.

I bet it was actually C++ with extern "C", which was my point, specially given the MPW and PowerPlant frameworks. I never knew anyone doing bare bones C on classic Mac.

There was a lot of extern "C" (and there still is a lot of that), but there also was a lot of extern "Pascal" back then, I seem to recall. There was a quite a bit of regular C in classic MacOS, though there was also a good deal of C++. You're right that MacApp (Which I think is what you're referring to with "MPW", which was an IDE) and PowerPlant were written in C++, but I'm not talking about the clients of the MacOS…

Faire enough, but sure it wasn't C++'s C subset?

Re: Brad Cox has died

#176
post #175

Earlier quoted context omitted.

There was a lot of extern "C" (and there still is a lot of that), but there also was a lot of extern "Pascal" back then, I seem to recall. There was a quite a bit of regular C in classic MacOS, though there was also a good deal of C++. You're right that MacApp (Which I think is what you're referring to with "MPW", which was an IDE) and PowerPlant were written in C++, but I'm not talking about the clients of the MacOS…

Faire enough, but sure it wasn't C++'s C subset?

In 68K times, the two compilers were quite different, the C++ was CFront at one point, and insanely slow. It would have taken a real masochist to compile C with a C++ compiler. I can't guarantee that nobody at Apple ever did that, but the suffixes were distinct. In that situation, IDEs usually make the distinction automatically, and it's not hard to write Makefiles to invoke the right compiler.

Re: Brad Cox has died

#177

There is no doubting the legacy of Objective-C (especially given the high likelihood you are reading this post on a mobile device, using app written in Objective-C), but to truly appreciate Brad's legacy, am curious about the appeal of using Objective-C. 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. Hence, I ask the quest…

That verbosity is exactly why I love it.

It's easy to write and easy to read (especially years later). It's just such a joy to work with.

Re: Brad Cox has died

#178
post #169

Earlier quoted context omitted.

> 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…

Absolutely incorrect: http://wiki.c2.com/?AlanKayOnMessaging

Alan Kay didn't invent object oriented programming though he was instrumental in expanding its scope and usage. Simula 67 was a big influence on Kay's work, and as he has noted, the "revelation" that "it's all messages" was a huge one.

But Smalltalk is just one OOP language, not the only one and not even the original one (though we could argue about how much Simula was or was not OOP, and I'd rather not).

The message from Kay you cite about is strictly about Smalltalk & Squeak:

> The big idea is "messaging" - that is what the kernal of Smalltalk/Squeak is all about

He doesn't say "what OOP is all about".

Re: Brad Cox has died

#179
post #169

Earlier quoted context omitted.

Absolutely incorrect: http://wiki.c2.com/?AlanKayOnMessaging

Alan Kay didn't invent object oriented programming though he was instrumental in expanding its scope and usage. Simula 67 was a big influence on Kay's work, and as he has noted, the "revelation" that "it's all messages" was a huge one. But Smalltalk is just one OOP language, not the only one and not even the original one (though we could argue about how much Simula was or was not OOP, and I'd rather not). The message…

Actually he did invent Object Oriented programming.

Simula was an inspiration, but was never considered as object oriented. After Kay came up with the concept, Simula was identified as part of the historical background.

“I invented the term object oriented, and I can tell you that C++ wasn't what I had in mind.” —Alan Kay.

Re: Brad Cox has died

#180

Earlier quoted context omitted.

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

It’s still a kind of neat trick. One of those paths where even a little optimization goes a long way due to it being so hot.
Post reply on HN