Let us say you went into Hertz and rented a car. Except as soon as you started trying to drive it you realized the brake and gas pedals are reversed. Would you be able to drive the car ? But the bigger issue is – would you trust that car anymore ? The location of the window controls, the radio controls etc are routinely moved around. But the location of certain things is sacrosanct and that is what allows people to drive different models of cars. Unless you can trust that the basics are exactly the same you would not drive the car! That is the same thing with programming languages, you can change a lot of things but I have found that operator overloading is one of the things which always throws a curveball to the maintainer. The initial developer will always have wonderful things to say about it – but remember that the maintenance period of the code is a lot longer than the initial dev and it is usually done by others. So please don’t do operator overloading – Yes it is cool and might save you x lines of code but it will make the code so much more difficult to maintain.
Filed under: Uncategorized | Leave a Comment
No Responses Yet to “Renting Cars and Operator Overloading”