Re:Removal of Unsafe in Java 9 – A disaster in the making
by pron on Monday July 13, 2015 @11:29AM
(#9878730)
"Works-out-of-the-box" backwards compatibility -- without flags -- has never been guaranteed (even the default GC is about to change), let alone for non-public classes. Whenever you compile a class that uses Unsafe you get a warning (that you can't disable!) that says "this class may go away at any time". Still the reality is recognized, and you'll still be able to use Unsafe -- despite all warnings -- and all you need to do is add a flag. I think that's very reasonable.
[ Parent
| on HN ]
Re:Removal of Unsafe in Java 9 – A disaster in the making
by snuxoll on Monday July 13, 2015 @11:35AM
(#9878772)
Thankfully, Project Jigsaw (if it lands) in JDK9 should remove the problem of internal classes entirely — they simply won't be available to use.
Re:Removal of Unsafe in Java 9 – A disaster in the making
by pjmlp on Monday July 13, 2015 @02:35PM
(#9880043)
It already did. Java 9 early alphas are available.
Re:Removal of Unsafe in Java 9 – A disaster in the making
by jryan49 on Monday July 13, 2015 @11:32AM
(#9878755)
I agree in most cases that it's perfectly reasonable. But from a pragmatic position, I think this needs to be treated as a special case because of all the people that are using it. I still like the idea of having a flag that opts people in to using internal classes. It's like an agreement almost that they know what they're doing is not supported across versions.