What is this thing called? (16)

6 Name: dmpk2k!hinhT6kz2E 2005-11-03 04:50 ID:0sDMo8yq

> Because it lets you write more efficient code without sacrificing readability?

You have to be kidding. That is readable? You've been in Perl-land far too long.

I'm familiar with C++, yet that still took me a few moments to decipher. Are you telling me that is more readable that the straight-forward non-overloaded implementation? Maybe I'm just rusty, but I really doubt it.

I don't like overloading simply because it makes code less transparent. What does this do in C:

a = b + c;

Pretty obvious, right? It adds two things. The only other detail is data type.

Now, what does it do in C++? Uh... well, let me check the definition. Hmm, not a standard type. Is that an object or not? Let me check the headers. Oh, it's a class? Well, shit, I'll need to look in the class declaration. Oh, no, the class inherits from elsewhere, etc.

Perhaps overloading is a useful tool that is just too easily abused.

This thread has been closed. You cannot post in this thread any longer.