[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (OT) Re: memory management
Steve Baker wrote:
>Overloading is OK - (great in fact) - but OPERATOR overloading is evil
>because
>it can result in people writing code that leads you to believe you
>understand
>it when in fact you don't.
class foo
{
int value;
public:
void GetValue () { return 42; }
void Add (int i) { value = -i; }
void Reset () { value = -value; }
}
Sorry, couldn't resist. With your argumentation you'd have to ban free
method naming ;) Every feature can be misused. And if used properly,
operator overloading is very useful.
Christian
--
Drive A: not responding...Formatting C: instead