small idea
Ali Çehreli
acehreli at yahoo.com
Wed Jan 9 08:59:11 PST 2013
I am responding before reading the rest of the thread.
On 01/09/2013 06:28 AM, eles wrote:
> In D, this is signalled by the in/out/inout keywords.
You mean ref, not inout.
> However, these are
> only visible at the moment of function declaration, not calling.
>
> In C, you usually can distinguish since parameters intended to be
> modified are passed through address (pointers), and you see that at use
> time:
>
> void make_a_equal_to_b(&a,b);
And in C++ it is again impossible because the ref parameter is a reference.
I've heard this proposal before. It is an interesting idea but I've been
coding in C and C++ for years. I have never had an issue related to this
topic. I always knew what a function call did. I don't remember a single
bug that was caused by this.
I don't even prepend "ptr" to pointer variable names.
So I don't see the benefit.
Ali
More information about the Digitalmars-d
mailing list