I'm working on one of my programs... and, in order to preserve backward compatibility while modernizing the code base, I had to emulate a bug in the older versions to keep things working. Anyone else ever had to do this? If you have, what were your experiences like? Hopefully, the fix for your code was as simple as it was for mine... here's what I had to do:
- Add a flag to indicate whether or not backward compatible mode is enabled
- Add code to set and clear this flag at reasonable times
- Add a little if statement to check this flag, and emulate the older behavior if it's on, else use the new behavior