4 ms·
I think the divide has a lot to do with those who have written or encountered codebases where operator overloading was used in well-meaning but ultimately confu
by kbenson 12y ago
I think the divide has a lot to do with those who have written or encountered codebases where operator overloading was used in well-meaning but ultimately confusing and error prone ways, and how they reacted to that.
Like many language arguments, I think it distills down to those that believe that when looking at any piece of code, it should be immediately apparent what's going on or where to look to find that out even without much knowledge about the codebase even at the expense of more code and having to scroll around to see it all, and those that believe that reducing the overall size of the code to be seen to it's more concise if better, even at the expense of requiring a bit more foreknowledge of the codebase.
The extreme examples of this are probably Java at one end, and APL on the other. Less extreme examples are probably Python and Perl.
I don't think it's right to say either is better than the other. They both have obvious benefits and costs. Unfortunately, I think those cost/benefit ratios are often changed because of outside forces, such as business demands that change how much time or how often a codebase is worked on and by who, so the initial impression of the programmers accessing this code is greatly swayed by the circumstances that they first see it in.