4 ms·
I'm very disappointed with Oracle's decision to remove Unsafe. What are they trying to accomplish? They aren't serving anyone by removing it. Who benefits from
by sreque 11y ago
I'm very disappointed with Oracle's decision to remove Unsafe. What are they trying to accomplish? They aren't serving anyone by removing it. Who benefits from its removal? What actual user of the JVM or customer of Oracle has ever said "I really like this 10x performance increase from this library that uses Unsafe, but I can't sleep at night thinking my program could seg-fault at any time if something went wrong! Please get rid of Unsafe Oracle! I promise to buy 10x more hardware from you to make up for the difference!"
Java's "write once run anywhere at all costs" philosophy, combined with "be safe at all costs", have kept the JVM locked into server-side Linux applications for a long time, while C# has continued to expand in areas like the mobile space. If it weren't for Java being propped up by Google, Java would hardly exist in the mobile world at all.
C# + the CLR has world class native code integration and escape hatches to drop to unsafe code when performance matters. Java's native integration is absolutely terrible, but at least it had Unsafe, which provided a pragmatic tool for achieving excellent performance on the JVM in a number of scenarios.
Now, look at this comment from an Oracle employee: http://mail.openjdk.java.net/pipermail/openjfx-dev/2015-April/017028.html http://mail.openjdk.java.net/pipermail/openjfx-dev/2015-Apri...
"Let me be blunt -- sun.misc.Unsafe must die in a fire. It is -- wait for it -- Unsafe. It must go..."
That's some very strong language backed by a simple, ridiculous reason; it's "unsafe". I honestly hope this Oracle employee's ideas die in a fire because they are out of touch with the needs of actual Java programmers, but my hope for that is slim at this point.
- bitmapbrother 11y agoDid it occur to you at anytime that they might have a replacement for unsafe in the works? I don't get why you think it's so unreasonable for them to replace something they consider "unsafe" with alternate solutions that do they same thing but in a proper and supported manner. BTW, Java will also get that "world class native code integration" with Project Panama.
- deleted 11y ago[deleted]