Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!apple!lsr From: lsr@Apple.com (Larry Rosenstein) Newsgroups: comp.sys.mac.programmer Subject: Re: Another THINK Pascal gotcha - "With" instance vars Message-ID: <11905@goofy.Apple.COM> Date: 29 Jan 91 23:02:36 GMT References: <1991Jan25.233122.2825@fennel.cc.uwa.oz.au> <1991Jan25.234200.7536@santra.uucp> <1991Jan29.021127.2840@fennel.cc.uwa.oz.au> Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 9 In article <1991Jan29.021127.2840@fennel.cc.uwa.oz.au>, a_dent@fennel.cc.uwa.oz.au writes: > > I know about "with" and the dangers of handles etc. The big point was that > you can take some perfectly safe code (using "with" on structures that are > local variables) and if you put it into an Object Pascal method, operating o There's nothing in the definition of Object Pascal that requires that these WITH statements be dangerous. MPW Pascal handles this properly; it doesn't load the dereferenced handle into a register, it dereferences it as necessary.