Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeder.news-service.com!216.196.110.146.MISMATCH!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Sat, 25 Jun 2011 03:39:22 -0500 From: Gareth Owen Newsgroups: comp.lang.c Subject: Re: References in C References: Date: Sat, 25 Jun 2011 09:39:48 +0100 Message-ID: <87d3i2xq23.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:veSFRD62I54Wbe5Ja9pxvOwo+zU= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Lines: 16 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-L6DWyVk7LK+FQ2ZL79P+XWt9JLPXMWZo0RC5HVl4eFjtazLoy5Rz7PqEatmpddDQKVq29qbAFeLEiUr!VlK7DVkv1KXdTVirhlFtWC2pXmO8AfmX/SYyZq5tzV2E9g8wount/VtIh8cFTixKE7k= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1666 Xref: x330-a1.tempe.blueboxinc.net comp.lang.c:6916 Keith Thompson writes: > foo(NULL); > > I should have been clearer that "the same thing" refers to some object. Quite - "doesn't point to nothing" is the best thing about C++-style references.[0] (Of course, there's still the possibility of "points to thing that no longer exists", but that's a lot less common source of bugs, in my experience). Of course, the other best thing[1] is "won't end up doing a very deep copy", but that's less of a problem in C. [0] why is pass-by-reference sometimes better than pass-by-pointer? [1] why is pass-by-reference sometimes better than pass-by-value?