Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!dptg!att!cbnewsk!ech From: ech@cbnewsk.ATT.COM (ned.horvath) Newsgroups: comp.sys.mac.programmer Subject: THINK C 4.0: first impressions Message-ID: <949@cbnewsk.ATT.COM> Date: 4 Sep 89 13:51:53 GMT Organization: AT&T Bell Laboratories Lines: 73 I've had my upgrade about a week, but I've been on the road and mostly have been reading the class library man pages. The language is strongly reminiscent of Object pascal; just enough features to let you do some interesting classes. Both direct (pointer based, like C++) and indirect (handle based, like MacApp) classes are supported, but you inherit that attribute from your superclass (single-inheritance class hierarchy). A cute feature is that "object->feature" does the right thing, generating code equivalent to "(*object)->feature" for handle-based objects. With reasonable care, it should be possible to write classes that migrate freely between C++ and ThinkC. The class library is strongly reminiscent of MacApp. It looks REAL nice, but I'll reserve final judgement until I've had more time to work with it. The multiple interwoven hierarchies (class; control; visual) are a source of mild confusion for me. Whether that confusion will fade or translate into frustration remains to be seen. The editor is not quite strong enough to serve as a browser; beefing up the option-double-click (try to find this symbol's definition) would help considerably. Finding "inherited::method()" is tedious, but algorithmic, so I hope Kahl&co. will consider adding it. As usual, there's no free lunch. What follows are not really criticisms, just observations. - The project size, with all the classes, is large: the trivial example apps smart-link to around 60K, but the project is more like 500K. - Apps built with the class libraries need lots of RAM: "Pedestal" ran out of memory in a 160K partition when I tried to pick from the Apple menu (on a Mac II in 8-bit color mode, 640x480 display). Presumably the MenuMgr couldn't find space to cache the bits it was about to cover up). - An aside: when Pedestal ran out of space, it displayed a nice little alert, to the effect of "Mac error -108". The application methods that caught and saved the app are in the class library. Now, "please increase the RAM assignment" is a bit friendlier, but -108 is plenty fine for programmer types. - A two-meg machine is just adequate for development. The ThinkC app itself hurts if you try to reduce the RAM below the 700K recommendation. The Debugger is anemic at the assigned 200K if you're using the class libraries; it seems happy at 250K, but so far that's just the trivial apps. Add Finder, Multifinder, a reasonably lean system (add about 100K each for Suitcase and TMON) and you've only got 200K or so left for an app. I suppose I COULD turn off one of those last two, but I'd probably start biting my nails again without TMON in the machine. I don't know how well the Think/Debug/App arrangement works with Virtual or the new Apple VM -- Rich, can you comment? At the moment, the only competition for this package is MacApp, if you are a pascal type. The latest APDALog includes a note from Jordan Mattson to the effect that C++ won't be in beta 'til 4Q89, and released 2Q90. MacApp for C++ isn't even scheduled that definitely, an optimist would hope for 2Q90. ParcPlace has announced ObjectWorks for the Mac, but I don't know if it's shipping yet; price figures to be in the $500-$600 range. Oh, yeah: I haven't actually TRIED this yet, but the multi-segment, A4-based code resource stuff supports classes. To the best of my knowledge, this is the only (shipping) development system for the Mac that can make that claim. I've been critical of Apple's studied silence on this issue for MPW-based tools, so kudos to the Think team for doing the right thing. My concern is not that I want to write 200K XCMDs, but that once I get used to using things like container types and nested grafPorts, I don't want to have to go back to the bad old ways just because I'm doing a DA or XCMD. All in all, looks REAL GOOD. Nice work, guys and gals! =Ned Horvath= Disclaimer: I've used 5 different C development systems for the Mac, and helped to write two of those. ThinkC wasn't either of them, unfortunately.