D - more or less power than C++?

Ben Phillips Ben_member at pathlink.com
Sat Mar 4 11:22:06 PST 2006


In article <dubpge$u3r$1 at digitaldaemon.com>, Johan Granberg says...
>
>>> 1. const parameters and member functions
>>>
>>> Countless times this saved me. I just can't imagine references being
>>> passed in and out of functions without something explicitly saying that
>>> the function is expected or not to modify it.
>You did not answer the above statement and i have seen this repeated all 
>over this thread along with destructors in structs.
>

A method can explicitly say that it will modify a reference by using "out" and
"inout".

I've never cared much for const member methods, so I'm confused as to how a lack
of them can cause such a problem. Can you give an example?





More information about the Digitalmars-d mailing list