Hacker News new | ask | show | jobs
by microtherion 1970 days ago
> 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 the kind of bugs that wouldn't get caught by a K&R C compiler), and by the late 1990, it was all C and C++, just with Pascal calling conventions for all public facing APIs. In my time at Apple, I never encountered a single line of Pascal code.

1 comments

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.

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.
Ok, thanks for the overview.