
I have not had time to look into shmem yet, so my comment is only to the above text without looking at the code. 2) No, No, No. I strive for pointer free code. A method that advertises a non-const reference tells you that it will modify the object. A const reference indicates that it will not. A function that takes a pointer tells me nothing. The problem is with calling code - you can no tell if the call is by const reference or non-const reference, until you find and check function declaration. And you might not know at all that there is such
On 2/9/06, Kevin Heifner <heifner_k@ociweb.com> wrote: possibility. foo(var) give no clue of the possibility of "var" been modified. In any case it is a controversial point - pointer are bad because they are pointer and we don't like pointers in clean C++ code, besides they may take NULL value. Non-const references are obscure in client code, but really fast, and returning multiple values, are seems to be the "cleanest" way, but the least efficient. -- Best regards, Zigmar