Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Initially I wondered why MacPaint wasn't written in C, but I'm rather grateful it's in Pascal; it's surprisingly easy to read! Although, I suppose Bill Atkinson deserves the credit for that.


I double-clicked on the .rsrc file, since I still have a working resource editor (Resorcerer) on my OS X Mac. No dice; it’s in the ancient MPW “Rez” format that acted as the original way to store resource information for development and source control before being compiled into the classic Mac dual-forked file format. I kind of wish I kept my CodeWarrior discs handy; they still had a Rez compiler that worked under earlier releases of OS X.

Interesting that they didn’t use the “ellipsis” character in the menus, preferring to hardcode the three periods. The Human Interface Guidelines were clear to use the single character (which does look different enough in the Chicago font), and these kinds of typographic details (via the MacRoman character set) were key selling points for the Mac early on.


That can't be right; Rez was a compiler that took plain text symbolic input. Most likely the .rsrc file is just an actual resource fork, encoded maybe in MacBinary format.


There's a command line Rez compiler shipped with Xcode. The name is case-sensitive.


I never thought to look in OS X’s command line only toolbox for that... but it’s just as well. The Xcode version of Rez can’t cope with way this format is written. Even re-saving the file as MacRoman/CR-delimited didn’t help much; the file is using commenting and identifiers unknown to a “modern” Rez file parser. It’s probably written in a dialect that only the Lisa Workshop or MPW can read.


Pascal and C were the subject of protracted language wars, with all the usual accouterments involved with those.

Pascal was very common back then; UCSD Pascal and pCode and Terak boxes were all over the place back in college.

Apple was (then) built on Pascal, and this was markedly different from C on SunOS, ULTRIX VAX and RISC/MIPS, AT&T S3 and SVID,and the early (buggy) VAX C on the odd VMS boxes.

(Java still reminds me of that Pascal and pCode implementation.)


From http://en.wikipedia.org/wiki/Pascal_(programming_language):

"Pascal was the primary high-level language used for development in the Apple Lisa, and in the early years of the Mac; parts of the original Macintosh operating system were hand-translated into Motorola 68000 assembly language from the Pascal sources. ...the C interface for the Macintosh operating system API had to deal in Pascal data types."

My memory was that C was considered a mainframe and IBM PC language, while the relative elegance and sophistication of Pascal was good style for Macs (esp. when leavened by a bit of assembly code).


It's interesting that there was such a notion, as C was never popular on mainframes.


I think he meant mini computers.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: