Sure, that stuff happens, but honestly? Coding to anticipate it when there is no reason to expect it is a very expensive form of premature optimization. If you’re going to multiply the costs of every project by 10x or 50x or whatever it comes out to on the off chance that you won’t have to rewrite an app when it’s use turns out to be huge, or mission critical, or whatever (because it’s not just shifting from something “high productivity” to “low productivity”, but now you have to think a lot more about edge cases, stability, security, and so on…), it’s really tough to justify that. I would rather treat these things as prototypes, and when they prove their value, say “OK, this turned out useful, now let’s do it right, using the lessons learned from the first go-round”.
J.Ja