Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mit-eddie!uw-beaver!zephyr.ens.tek.com!tektronix!reed!minar From: minar@reed.bitnet (Nelson Minar,L08,x640,7776519) Newsgroups: comp.lang.c++ Subject: Passing by reference (was Re: C++ coding standards (Comment needed)) Keywords: standard,variables Message-ID: <15361@reed.UUCP> Date: 23 Aug 90 06:35:05 GMT References: <2161@runxtsa.runx.oz.au> <183@logo.procase.UUCP> Sender: news@reed.UUCP Reply-To: minar@reed.bitnet (Nelson Minar) Organization: Reed College, Portland, OR Lines: 24 I have one issue that concerns me about C++ syntax - the pass by reference capabilities. Lord knows its a convienience. It cleans the calling syntax up quite a bit, it makes certain constructs possible that really aren't otherwise. However, I find it really nice to know in C that 'hey, in this function call that variable is passed by value. The function can't be changing the value of that variable, and thus the bug is elsewhere.' Its useful when debugging other's arcane code. In C++, this information is not available merely from the function call. Who knows if int a = 0; foo(a); will change the value of a or not in C++, without finding the prototype for the function and looking carefully. Is there any sort of nice convention to make this easier to deal with? I assume not.