Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!samsung!think.com!mintaka!spdcc!ima!dirtydog!karl From: karl@ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Addressing struct without -> Message-ID: <1991Jan16.201035.20387@dirtydog.ima.isc.com> Date: 16 Jan 91 20:10:35 GMT References: <91010.084408NIBMSCM@NDSUVM1.BITNET> <14822@smoke.brl.mil> <1290@mti.mti.com> Sender: news@dirtydog.ima.isc.com (NEWS ADMIN) Organization: Interactive Systems Lines: 11 In article <1290@mti.mti.com> adrian@mti.UUCP (Adrian McCarthy) writes: >What bothers me about x.y and x->y is that I shouldn't *in many cases* have >to worry about whether x is an instance of a struct or a pointer to one. I see no significant difference between this and the related worry about whether `i' is an int or a pointer to one. If it really bothers you, use C++ and references; or if that's too much trouble, emulate the effect with #define x (*px) (I often use this when dealing with what is logically call-by-reference.) Karl W. Z. Heuer (karl@ima.isc.com or uunet!ima!karl), The Walking Lint