Live data from Hacker News

JDK 8 Release Notes

oracle.com

161–170 of 314 posts

Re: JDK 8 Release Notes

#161

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

It always bothered me that Java forces me to explicitly handle/rethrow exceptions, yet happily overflows my ints without batting an eyelid.

Re: JDK 8 Release Notes

#162
post #4

You 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…

Those warts have been addressed by 3rd-party libraries. The ecosystem is much better (more stable, higher quality, higher "engineering" effort) than Ruby or Python. Might not suit to one's taste but we all have different taste buds.

You know I'm not sure I completely agree on this point. As someone that's lived in both the Java and Ruby worlds for a long time I'd say that in a many number of cases you're right. The "shiny object" syndrome is much less of a factor in the Java world and things like backward compatibility are engrained in the culture which manifests itself in the various open source projects. In the ruby world things are simpler to get started with and the surface area of a project is usually smaller and fairly easy to get integrated compared to Java. But ruby projects tend to "rot" much more quickly and aren't nearly as strict about compatibility. That's probably because Rails, the biggest reason for ruby's popularity, is very much about breaking compatibility without a second thought if it means improving the framework. But I've also seen some really well written and tested ruby gems in my time, compared to some java projects... and visa versa.

Re: JDK 8 Release Notes

#163
post #56
post #33

Earlier quoted context omitted.

I was going to reply with exactly the same thing, and I'd add slf4j.

Because God knows, Java needs another logging framework. Seriously does ANYONE get any additional value out of the morass of crappy logging systems out there over and above System.out.println? Log4J is PARTICULARLY brain-damaged, with its refrain of "ooh, someone put a log4j.xml in their JAR (one of hundreds), that beats your log4j.properties.". Or SL4Js amazing performance of "1.6 doesn't work with Scala because of…

Never had a problem with slf4j on top of log4j. By the way, I use DEBUG in development and INFO in production. The ratio of logging messages between the two levels is about 1 for 50. Definitely an useful feature on top of System.out.println. I also change log levels for certain packages because some libraries are too verbose.

Why are you so bitter ?

Re: JDK 8 Release Notes

#164

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…

I like checked exceptions in certain situations. I generally dislike the checked ones that come with Java ^1, but it can be very useful to create your own. I had a situation where I was interacting with an API that would sometimes fail over things I could not control. But, the code responsible for interfacing with the API didn't have the context for handling those errors.

Initially I threw a Runtime (ie: non compile time) exception. After going to production I realized that these were bubbling up to the UI and giving the user very intimidating error messages. So I changed the exception to a Compile time exception and then the compiler caught every place I let the error slip through to the UI. In my opinion it saved me a lot of time and made my code easier to maintain.

1: EG: Who is Java to say that this IOException should be handled in code? Perhaps this IOException should not happen and requires a developer's intervention.

Re: JDK 8 Release Notes

#165

Earlier quoted context omitted.

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.

Exactly - checked exceptions is more of an policy / code style decision, null and NPE - roughly the same and in the end your spider sense just knows where to expect it.

But type-erasure of generics - that's the decision with which we will need to live till the end of time.

  - no multiple implementation of same generic interface
  - http://stackoverflow.com/questions/2723397/java-generics-what-is-pecs
  - small performance hits..
  - casts
  - a lot more but I'm just sleepy right now.
I use and like Java, I love the backwards compatibility which it has - but there are times when crust can be removed with scalpel - and if not, you will need an jackhammer later.

Re: JDK 8 Release Notes

#166

Earlier quoted context omitted.

Popularity != Quality

I don't think you can become a popular cross platform systems programming language without being pretty decent.

There is a lose correlation between quality and popularity, but being the most popular language is in no way indicative of being the best language (as the person I responded to was saying).

Re: JDK 8 Release Notes

#167
post #95

Earlier quoted context omitted.

I'm not sure why you felt the need to add "a better light weight", why not just say "Netbeans also got Java 8 support"? This isn't the place to start a flamewar.

On account of it being better and more light weight? :o)

Better is subjective, and the cause of many flame wars.

Re: JDK 8 Release Notes

#168
post #103

Earlier quoted context omitted.

In my opinion http://www.typesafe.com stack is the most powerful and consistent one running on JVM. Scala/Play/Akka/Slick/SBT speaks for itself and I enjoy every day of working with it.

Not sure if I enjoy SBT but Scala/Play/Akka is definitely great

Does anyone enjoy SBT? My love for Scala is profound, but fuck SBT

Re: JDK 8 Release Notes

#169
post #18
post #4

You 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…

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…

The JVM has a couple of pretty significant problems when trying to work with functional-style languages. The biggest one is the way it deals with the stack: It's not in the heap, and it's pretty limited, so with something like scala, and more specifically with scalaz, you have to do some contortions to avoid overflows. 90% of usages of scalaz trampolines are nothing but ways to work around JVM limitations.

I'd argue that today, you are better off with the .NET VM, as far as features are concerned. But being stuck in windowsland is really a non-starter for all kinds of applications. I can send a major task that will take 400 computers for a week to Amazon if my code relies on the JVM. If I write it in .NET, not so much

Re: JDK 8 Release Notes

#170

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

Optional in jdk8 will help with null: http://download.java.net/jdk8/docs/api/java/util/Optional.ht...

But without a pattern matching system, optional is still half of what it is in, say, Scala.
Post reply on HN