Earlier quoted context omitted.
A major cleanup of the Java libraries is scheduled for Java 9. The JVM actually does not surprise anyone who's been working with it for a while: it is downright the most performant, flexible and awesome runtime environment ever developed. I've been playing around with lots of languages and environments in my pretty long career and, in the past decade, have always come back to Java (or the JVM). It feels like driving…
Do you have more info on the cleanup in Java 9? Will they remove some deprecated methods then?
JDK 8 Release Notes
121–130 of 314 posts
Re: JDK 8 Release Notes
#122I'm very happy with the JVM in general, but I really, really, really wish they fixed the start up time. People compile Clojure down to Javascript for command line tools precisely because of this. lein takes annoyingly long, so I don't do it. I realize this is not a real concern for them for e.g. servers, but I wish they had some developer- or desktop-specific configuration that would start about as fast as a Python V…
Re: JDK 8 Release Notes
#123You know, I've been messing around with Java little lately. Nothing too fancy. It's actually not a bad language -- with a modern IDE it's actually pretty quick and breezy to work with. If the standard library was cleaned up and the warts were all removed and filled in, even if it broke compatibility (call it Java X or the Latte language or something) I'd be okay with that. There's too much old 90's cruft hanging arou…
No, actually, Java is a really bad language. It has a very complicated type system, but doesn't even allow you to express things like function composition or generic sums at the language level. Its syntax is stunningly verbose (e.g., no map literals; only now adding lambda literals; no type synonyms; no operator overloading). There is no macro system or method_missing or any other way of really extending the language…
Yeah, sure, it doesn't have Haskell's . or algebraic datatypes, just like lots of other languages. I'm not sure what's complicated about the Java type system, but I suspect you're trying to say you don't like subtyping. Moving on...
> Its syntax is stunningly verbose (e.g., no map literals; only now adding lambda literals; no type synonyms; no operator overloading).
No map literals, but Guava has leveraged generics in a brilliant way to reduce the duplicate declaration of types. Also, it brings a little bit of functional-style goodness with transform/filter. It turns even JDK 6 into something you can be productive with. I'm not sure the lack of type synonyms is really an issue, the type signatures are rarely complex enough that you need to obfuscate them. On the other hand, I'd give somebody else's right arm for an equivalent to newtype and deriving.
> There is no macro system or method_missing or any other way of really extending the language, except the ugly, unsafe reflection system ... so now all the libraries (Spring, Hibernate, etc.), use annotations and reflection to modify object behavior at runtime.
Not to forget proxy objects and interceptors. But yes, Java could definitely use a macro system.
But you're missing the elephant in the room, the existence of null. The bane of every Java programmer, dreading NPEs at each function call.
Re: JDK 8 Release Notes
#124http://docs.oracle.com/javase/tutorial/java/annotations/type...
Re: JDK 8 Release Notes
#125Earlier quoted context omitted.
logback is pretty great. I can't take anyone seriously that defers all logging to System.out.println - do you really want the inability to change logging levels between live, test, etc?
Hmm. I've used that feature about once in 20 years of coding professionally. My production systems don't generally log; they're busy serving (I once worked on a hard real-time embedded air traffic control system where production logging was literally a single bit of information - a logic level that went high when the processor was busy, and low on idle - so we could measure our timing safety margin with an oscillosco…
Very useful to find out what inefficient code people have generated with Hibernate. Occasionally useful to find out what Spring is doing.
Re: JDK 8 Release Notes
#126Earlier quoted context omitted.
Is there any chance you could briefly enumerate some of the things that make the JVM's approach to concurrency so strong? I'd be interested.
It's not the approach, but the capabilities: 1. State-of-the-art garbage collectors, which enable good implementations of lock-free data structures. 2. Excellent implementations of lock-free data structures (like ConcurrentLinkedQueue and ConcurrentSkipListMap) and other concurrent data structures (like ConcurrentHashMap). 3. A state-of-the-art work-stealing scheduler (ForkJoinPool), excellent for both parallelism (a…
Re: JDK 8 Release Notes
#127Earlier quoted context omitted.
If you aspire to make Java into the type of language we would arrive at if we redesigned Java from scratch today, it's not just a matter of adding good features but also removing bad ones. For example, you'd go directly to Joda-Time or JSR-310. Date and Calendar wouldn't be present at all. Whether Java should break compatibility to remove all the old cruft I'm not sure. The benefits of the cleaner design might not be…
Is there any major language out there that actively removes old/bad parts of it's standard library?
Re: JDK 8 Release Notes
#128Yay!! Java 8 is released!! My favorite parts: - invokedynamic : http://stackoverflow.com/questions/6638735/whats-invokedynam... - Project Nashorn : http://openjdk.java.net/projects/nashorn/ - lambda expressions : http://openjdk.java.net/projects/lambda/
Re: JDK 8 Release Notes
#129Anyone know what Google is going to do about Java 8 compatibility on Android? Not being able to adopt lambdas on mobile is a bummer.
Apparently Android is not using Java, but something that looks like Java. I bet Google vs. Oracle trial can be attributed to that. :)
Re: JDK 8 Release Notes
#130Earlier quoted context omitted.
Methods are marked as deprecated when they're planned to be removed in the next version.
That's the story that gets told, but how often have they actually removed something after deprecating it? Does anybody have a single concrete example of a method that actually went away? http://stackoverflow.com/questions/18063599/has-ever-anythin...
I think part of the reason for this ultra-conservative approach might be that alternate JVM implementations could in theory have well-implemented versions of deprecated methods such as the above-mentioned Thread ones.