As you know if you've read some of my other questions, I'm writing a programming language.One of my big concerns is that many languages have troubles with backwards compatibility, and I wish to avoid such issues.
the syntax of C is a poor fit for many C++ constructs.
My solution is to allow programmers to add a compiler directive to the file which will tell the compiler which version of the language to use when compiling.
But my question is, how do other languages handle this problem?
Are there any other solutions that have been tried, and how successful were those solutions?
Now let's say you realize that your Date class was fundamentally flawed and you depreciate it.
The problem is that now you have to replace it with something else.And that something else probably still represents a date, but you can't call it a "Date" because that name is already taken.So you have to 1) call it something else which isn't an accurate name, or 2) design an alternative that doesn't represent a Date, (which is how we got Java's Calendar).Questions on Stack Overflow are expected to relate to programming within the scope defined by the community.Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Easy : Deprecation When new methods or functions are available, they don't simply eliminate the old ones. So, developers working on new compilers know that at some point they will need to use the new versions of those functions or in the future their program won't compile.In that way they are 'backward compatible' but at the same time enforcing the usage of the new functionality.