Live data from Hacker News

JDK 8 Release Notes

oracle.com

151–160 of 314 posts

Re: JDK 8 Release Notes

#152

Earlier quoted context omitted.

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…

Java is not a bad language. It was written as a reaction to C++ - a simpler, more consistent systems programming language. In that regard it has been wildly successful. It doesn't really look like a dynamically typed scripting language because it was never trying to be one. You pick a bunch of language flavour / syntactic sugar and say that Java is bad because it doesn't have those. Personally I like it because it do…

... and also this makes Java a great choice for large distributed teams of programmers of different levels of expertise.

Re: JDK 8 Release Notes

#153
post #99

Earlier quoted context omitted.

JavaFX is now a default platform (supported by Oracle) for developing desktop apps. It replaced the clumsy Swing and is showing a lot of promise. http://www.oracle.com/technetwork/java/javase/overview/javaf...

What is the case for desktop apps these days vs web apps? I would love to mess around with JavaFX but really can't come up with a compelling reason to use it.

If you want to interact with local hardware/storage media, native apps are still easier. "Offline" mode can also be the default, at least for systems that have a local data store. Finally, multicore CPUs may be theoretically exploited with web workers, but it's a lot easier to just spin up a native thread in your Java code.

Downsides are all the usual ones, of course: updates don't happen automatically, you may need some sort of licensing/DRM if you want people to pay for your application, and your testing story is a lot more complex. (Plus: look-and-feel on various platforms, reverse engineering is that much easier, etc., etc.)

Re: JDK 8 Release Notes

#154
post #131

Earlier quoted context omitted.

> painfulness to read (not debug with an IDE, which is easy, but to actually read Java code) This is incredibly important and I never see any Java advocate addressing it. I _do_ see tons of people pointing out how easy it is to automate refactoring, and then they leave dozens of ugly, poorly-thought-out methods lying around...

The problem is that there are two major kinds of "reading code". There's (A) the brief pass you do to get the gist of what a class/method does, and (B) the deeper pass when you try to build a mental model and step through bits of code in your head. While Java's verbosity does harm skimming, it also aids targeted comprehension, since it is easier to see the "one right behavior" that code has. Fewer sneaky surprises, l…

Verbosity adds noise (redundant information), or information that is usually redundant, so you get used to it, so when you see the ~same pattern again, you skim over the things that you think are the same. But then sometimes it isn't quite the same, because of a bug or because the for loop does a decrement rather than an increment, which is lost on you.

Finding the balance between terseness and having a little bit of redundant information is of course very hard.

Re: JDK 8 Release Notes

#155

Earlier quoted context omitted.

> 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. 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 (…

Checked Exceptions and null. I write a lot of Java and I generally enjoy the language, but those two things; if Oracle could fix those somehow I would be extremely pleased. I'm so tired of writing null checks and I hope Optional is not the final answer since it too can be a null due to programmer error. I am really worried about Optional getting abused in Java 8... Actually, I waffle on checked exceptions; it seems e…

> Checked Exceptions and null

I hear you.

Re: JDK 8 Release Notes

#156
post #100

I'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…

Can you please give a use case of a program that a few hundred ms delay during startup would be an issue?

Few hundred milliseconds? I played with clojure a month or so ago and invoking lein repl was ~7.5 seconds.

Re: JDK 8 Release Notes

#157

Earlier quoted context omitted.

> 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. 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 (…

Checked Exceptions and null. I write a lot of Java and I generally enjoy the language, but those two things; if Oracle could fix those somehow I would be extremely pleased. I'm so tired of writing null checks and I hope Optional is not the final answer since it too can be a null due to programmer error. I am really worried about Optional getting abused in Java 8... Actually, I waffle on checked exceptions; it seems e…

> Checked Exceptions and null.

Let's not forget about type-erasure generics. And the existence of arrays. And the fact that people still use arrays.

Re: JDK 8 Release Notes

#158
post #156

Earlier quoted context omitted.

Can you please give a use case of a program that a few hundred ms delay during startup would be an issue?

Few hundred milliseconds? I played with clojure a month or so ago and invoking lein repl was ~7.5 seconds.

Yes, I can confirm this.

Clojure seems like a good fit for tiny projects that are little more than scripts, but the start up time makes them kind of annoying to manually test. Fortunately Clojure does have a REPL.

Re: JDK 8 Release Notes

#160
post #127

Earlier quoted context omitted.

Is there any major language out there that actively removes old/bad parts of it's standard library?

Scala? It's still a very young language, though.

What have they removed from the standard library? Just curious.
Post reply on HN