Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!usc!apple!agate!shelby!rutgers!att!cbnewsk!ech From: ech@cbnewsk.att.com (ned.horvath) Newsgroups: comp.sys.mac.programmer Subject: Re: THINK C Suggestions Message-ID: <1990Oct9.174549.5315@cbnewsk.att.com> Date: 9 Oct 90 17:45:49 GMT References: <1990Oct9.020415.16763@eng.umd.edu> Organization: AT&T Bell Laboratories Lines: 20 From article <1990Oct9.020415.16763@eng.umd.edu>, by russotto@eng.umd.edu (Matthew T. Russotto): > ...If you make a smart > compiler, you can recognize handles to structs and add the extra de-reference > automagically-- I'd like to see that (in both THINK and MPW.) I would NOT. A handle to a purgable object -- resources are the typical case -- has to be checked before use: if (*thud) LoadResource (thud); HNoPurge (thud); /* use it */ HPurge (thud); and blurring the distinction between handles and pointers is hardly helpful. It could be argued that (*thud).member should be different from thud->member, but those two have been equivalent since the original K&R book. =Ned Horvath=