- Since the new methods are not available, using the new function setFillColor means breaking compatibility with older SFML versions
The same is true for feature additions. Backwards compatibility means that older code still compiles under a newer library version, not vice versa.
The implementation of SFML_DEPRECATED causes MSVC to issue warnings that turn into compilation errors if /sdl is enabled.
I know,
and I already mentioned that when we discussed the pull request. There were no objections during a month. Furthermore, we already had
a detailed discussion about deprecation that started 3/4 years ago, and the conclusion was that it is a good thing. You also see this concept in all kinds of libraries or programming languages.
However, I still think that at the moment the code gets worse if setFillColor is used. It stops to work with SFML 2.0, 2.1, 2.2 and 2.3 for no reason
And the same is true if we introduce it at a later stage. Only that people have less time to adapt their code until we remove the function, and then code
actually becomes backwards-incompatible.
What if we didn't mark it as deprecated? There would be two functions in the API with identical semantics, and people would never know which one to use, or if there is a difference at all. And older SFML versions would
still break if
setFillColor() is used. Marking
setColor() deprecated on the other hand makes users aware that it is going to be removed, and gives them time to migrate their code. Whether they care or not is their decision, we intentionally left the option to disable warnings.