8

Java 17 and I see methods in the API that apparently were deprecated back then in Java 1.1! Shouldn't deprecation be the precursor to being eventually removed? Or is backwards compatibility so much important that is ok to have shit in this limbo state for decades?

Comments
  • 3
    That seems unlikely, did you check correctly?

    There has been several packages and classes deprecated in Java 8 that were already throwing warnings in Java 11 and were completely removed in Java 17. So in my experience java doesn't tend to keep deprecated code in for too long. It tends to be about 1 major release or so I suppose.

    Could you be using some sort of custom JDK that still has it? Or maybe some library has it? A lot of stuff that went missing in Java 17 were moved from the javax. to libraries like jakarta... so maybe you're seeing a method from an alternative implementation? or someone else importing into the java package or something?
  • 1
    @Hazarth I was thinking about some methods of the java.util.Date class like getHours():
    https://docs.oracle.com/en/java/...
    But you are right that is not that common in java to come across these situation. When in my job I encounter a deprecation it's almost always from the Android SDK and not from Java.
  • 1
    @cafecortado C++ can deprecate all it wants, but can't remove because of ABIs on various platforms. So in the respect C++ is worse off.
  • 1
    @Demolishun c++ is truly bogged down and will only become more and more of a monster as time goes on. I hope they eventually do a new major release with breaking changes to clear out the technical debt. Else, maybe Carbon will be good?
  • 0
    @AlgoRythm I see more and more usage of interpreted languages in the future. I don't C++ (or C) are going anywhere for a long time though. Maybe a lack of skilled professionals will cause it to shift in the future. The other system languages out there have their work cut out for them if they want to replace C++.
  • 1
    @Demolishun carbon is a good contender, it has Google behind it (google uses a lot of c++) and is interoperable with c/c++

    Zig is also a great contender and already production ready and one of the highest performing languages available.
Add Comment