info-mac@uw-beaver (01/17/85)
From: JBA%MIT-OZ@MIT-MC.ARPA I recently had the opportunity to use Modula Corp's Modula 2 (M2) for the mac. It compiles into pseudocode. Comes with all the standard modules, plus several for interfacing with the mac (including quickdraw and toolbox). I didn't use any of the mac-specific stuff, so I can't comment on how complete it is. The compiler is fairly slow--there are four passes, plus I think it's written in M2. The linker, however, is quite fast. I really liked programming in M2. The great thing about it is that you can do separate compilation AND be assured that things are being type-checked across compilation boundaries (C users take note). Also, since definition and implementation modules are separate, and the compiler only needs the definition modules, you can change the code in a module, recompile ONLY that module, and relink, and you're in business. (Provided the change in code doesn't also require a change in specification.) Because the compiler has to look at so many files, it's slow if you use a disk. But I was running on a 512K mac with a ramdisk and some other amenities (see below), and it was great. Because it's pseudocompiled, M2 is not suitable for development, but for other stuff it's currently my language of choice on the mac. The only serious problem I've noticed is that ADDRESS types are not compatible with CARDINAL and INTEGER. I suspect this has something to do with the fact that ADDRESSes are 4 bytes, the others only 2. The problem is that I can't do address arithmetic easily. (The old Pascal variant record trick doesn't help much, since there are two CARDINALs to an ADDRESS.) The disk I got was full of M2 stuff; not even room for a system file. However, by throwing enough junk away, I was able to fit everything comfortably on one disk. I used the Font Mover, the Desk Accessory Mover and MockWrite. These last two are put out by CE Software, I think is the name, from somewhere in the midwest. The disks are copyable so should be floating around your neighborhood. MockWrite is a DA which is a simple text editor. HOW TO GET THE ENTIRE M2 SYSTEM (ALMOST) ON ONE DISK: 1. Throw away all files except: the compiler and Compiler Stuff folder; the linker; the "tools" Modula-2 and Modula 2; the SYM and REL files. (Yes, throw away the editor). 2. Take a system file and use the font mover to get rid of ALL fonts you can. 3. Use the Desk Accessory Mover to get rid of all desk accessories from the system file and install MockWrite. 4. Put the system file and a finder onto the M2 disk. Now you can use MockWrite to write programs, saving you lots of space plus the pain of switching applications. If you have a ramdisk, you can copy the system to it, speeding some things up a lot. --Jonathan Amsterdam (JBA@MIT-OZ)