4 ms·
The core underpinnings of the Mac, including QuickDraw, were written in Pascal, with some 68k assembly in critical speed sections. QuickDraw began life in 1979
by doomlaser 8y ago
The core underpinnings of the Mac, including QuickDraw, were written in Pascal, with some 68k assembly in critical speed sections.
QuickDraw began life in 1979 written by Bill Atkinson in Pascal and still ships in MacOS High Sierra. Photoshop originally lifted its main design metaphors and toolbar icons from Atkinson's (and Susan Kare's) MacPaint.
MacPaint and QuickDraw source code: http://www.computerhistory.org/atchm/macpaint-and-quickdraw-source-code/ http://www.computerhistory.org/atchm/macpaint-and-quickdraw-...
Recent long-form interview with Bill Atkinson: https://www.youtube.com/watch?v=6tUWoy1tJkE https://www.youtube.com/watch?v=6tUWoy1tJkE
- pjmlp 8y agoThe switch to C and C++ only came when Apple decided to cater to the increasing UNIX market pressure. Which was actually C++, given that they tried to port MacApp to C++. While at the same time Metrowerks, which was the major compiler vendor on the Mac, introduced PowerPlant. https://en.wikipedia.org/wiki/MacApp https://en.wikipedia.org/wiki/MacApp https://en.wikipedia.org/wiki/PowerPlant https://en.wikipedia.org/wiki/PowerPlant https://archive.org/stream/ApplePascalHistoryDTC92/ApplePascalHistoryDTC92_djvu.txt https://archive.org/stream/ApplePascalHistoryDTC92/ApplePasc... Comments at http://blog.fogus.me/2017/07/20/pascal-at-apple/ http://blog.fogus.me/2017/07/20/pascal-at-apple/ So plain C always had very little place at Apple, even at NeXT it was all about Objective-C and Objective-C++, including the driver framework. Both A/UX and NeXTSTEP used UNIX compatibility as a means to bring software into the platform, but the goodies were in the platform specific frameworks.
- doomlaser 8y agoPascal had some annoying implementation features on the Mac: Fixed length string types, for example: Str31, Str255, etc. > So plain C always had very little place at Apple, even at NeXT it was all about Objective-C and Objective-C++, including the driver framework. That was at NeXT in the late 80s and only came to Apple after Amelio bought NeXT to use NeXTStep as the Classic Mac OS followup. Apple shipped their first C compiler with MPW 2.0, released on July 20, 1987.
- pjmlp 8y agoJust like C had its quirks, at the time, Small-C was the dialect most of us had access to, outside expensive UNIX systems. Turbo Pascal later fixed those issues, still on MS-DOS. On Apple as they switched focus to C++, they left the Pascal support stagnate.
- willtim 8y agoFixed-length string types are appropriate for a lot of low-level systems programming and are a lot safer and secure than C's null-terminated (potentially unbounded) strings. Null-terminated strings have caused problems not just for security, but have also added significant performance costs: https://queue.acm.org/detail.cfm?id=2010365 https://queue.acm.org/detail.cfm?id=2010365
- doomlaser 8y agoSafer, maybe, but annoying to work with: definitely
- buserror 8y agoI remember these years well, and there were years where C (not C++) was prevalent on the mac dev market. Metrowerks only appears quite late, with the PowerPC macs -- I remember having both a prototype of the PowerPC 601 66Mhz pizza box and the fancy new compiler on the block delivered from apple (I remember the excitement -- that sort of excitement new tech delivered that I never really found again after that decade!). I stayed on the 'permanent beta list' of metrowerks until they vanished. Before that, THINK C/Symantec C/C++ existed and were in use extensively including inside of apple, but most of the software was plain C, or "base C++" (it was before the time of templates and stuff like that) at best... Apple never used C++ for system interfaces. Even 'Carbon' on OSX still used Pascal Strings for the historycal toolbox calls. Over the years they added extra helpers and extra glue code to cater for C, but they stuck more or less to their API design until OSX arrived. The funny bit is that even afterward they continued with some of their paradigms, the 'component' one for example, was still in used for years afterward for quicktime stuff, in OSX. Likewise the AppleEvents (also using "components") had the same paradigm and structures as it ever had (and migth still have!)
- pjmlp 8y agoSome of my knowledge was from reading Computer Shopper and other computer magazines with a Mac section. It was unthinkable for most business in Portugal to get a Mac, given that there was only one official importer, Interlog, with shops in Lisbon and Porto, nowhere else. So I had the idea the C++ frameworks were introduced as the same time as the C, C++ SDK, not was system interfaces, but as wrappers on top of them.
- jcelerier 8y ago> Apple never used C++ for system interfaces. ... eh ? https://developer.apple.com/library/content/documentation/DeviceDrivers/Conceptual/WritingDeviceDriver/CPluPlusRuntime/CPlusPlusRuntime.html https://developer.apple.com/library/content/documentation/De...
- buserror 8y agoThat's an OSX kernel interface, not at all related to what they called 'classic' afterward... Beside, despite the syntax sugar, it is NOWHERE near C++ at all. No constructors/destructor (if I remember correctly), no stack based objects, no exceptions, no virtual functions, no library, and you had to provision your classes with the right number of member function 'dummy' pointers to allow for expansion. I've written enough OSX drivers back then to know that, quite frankly, C would have been a lot better.
- pvg 8y agoWhen did Unix exert any kind of serious market pressure on Apple or really any other maker of consumer PCs.
- pvg 8y agoThere's no Pascal to speak of in the QuickDraw source code you linked. MacPaint itself contains a big chunk of 68k assembly.