Live data from Hacker News

JDK 8 Release Notes

oracle.com

301–310 of 314 posts

Re: JDK 8 Release Notes

#301
post #296

Earlier quoted context omitted.

> You have probably encountered the occasional Java desktop app, without realising. If you can't easily tell it is Java, the development team have done a good job. I've never seen any Java desktop app that I cannot easily tell it's Java. With most of those apps, even on i7/16GB/SSD systems, you get laggy behavior with Swing and the GC. And SWT still has the "uncanny valley" look going.

Usually because the said developers are too dumb and do everything on the UI thread.

Yes. And things are a lot better now, I remember using IBM WebSphere UI tools (written in Java) circa 2004-5.

It took several seconds of whited-out buttons and stuck UI for every CPU intensive operation -- all on the same thread. And that was from IBM, and from tools that you paid for a small fortune.

Re: JDK 8 Release Notes

#302

Earlier quoted context omitted.

What is best practice when it comes to Java GUIs? Would you recommend Java for building cross-platform desktop apps with near native UI performance? The IntelliJ IDE looks great but most Java desktop apps I've come across just look and feel weird. Not sure why there is such a big difference.

Have a look at SWT. It's the best way to do Java UIs IMO. I don't know why it isn't more popular. It uses the native UI kits internally, so it feels and is 100% native.

100% native on Windows maybe (and even there it depends on the Windows version). On the Mac it's like a foreign object.

And that's for the more basic widgets -- more advanced widgets have custom implementation from primitives in SWT, so they are hit and miss with regards to native look and feel.

Re: JDK 8 Release Notes

#303
post #39

Java 8 made our in-house ASR engine %5-10 faster. Free performance is always welcome.

What kind of operations do you do? Fixed/floating point? Allocate memory or pool?

A lot of floating point operations are done in GMM likelihood calculations. Dynamic decoding with Viterbi beam search and language model queries are other operations. We pool some memory but we do not try hard for this. Allocation is cheap in Java. Cache aware design saved a lot of performance for us.

Re: JDK 8 Release Notes

#304

Earlier quoted context omitted.

> Multiple return types. Scala has hacked around it, Python has them, Go has them. Bite the bullet and implement them so you can do sensible error handling without exceptions or returning `null`. Heh? How are these things related to each other? Who in their sane mind would use tuples for error handling?

`Go` uses them in that manner. f, err := os.Open("filename.ext") if err != nil { log.Fatal(err) }

Ouch, forgot that. That's of course beyond stupid.

Re: JDK 8 Release Notes

#305
post #240

Earlier quoted context omitted.

> I mean, Clojure Scala and Groovy all run on the JVM, and we talk about them all the time! 5 years ago those 3 languages were the talk of the town for alternate JVM languages, but things change. Scala's pulled way ahead of the pack, Clojure's consistent, and Groovy's on a downward trajectory, following in Beanshell's and JPython's footsteps. Eclipse users are drifting into Xtend, and IntelliJ users may look at Kotli…

With groovy being pulled more into use with spring and great test frameworks like Spock, I see more groovy use paired with java not less. Scala is the interesting one I'm interested to see if a simplified type system can be introduced ala http://www.infoq.com/presentations/data-types-issues

> groovy being pulled more into use with spring

Within the Spring Framework 4.0 Reference [1], the Spring Expression Language takes up all of chapter 7, whereas Groovy takes up little section 28.3.3 only, with only one use case presented. Your statement didn't have any specifics, only sales adjectives like "great test frameworks."

[1] http://docs.spring.io/spring/docs/4.0.0.RELEASE/spring-frame...

Re: JDK 8 Release Notes

#306

Earlier quoted context omitted.

Interesting. Scala always put me off, the sytax just seems so nasty. Does that just get better after working with it for a while?

So much better ;-) There's a learning curve, can't hit the ground running as you can with Groovy, but with Groovy there's a ceiling; with Scala the only ceiling is (perhaps) Haskell and for that you have to leave the JVM.

Languages where you can "hit the ground running" always have a ceiling. If you churn out working code quickly, you're offloading the real work onto someone else in the future. Real world programming, like business, is all about borrowing from the future, intending to default on the debt.

Re: JDK 8 Release Notes

#307

Earlier quoted context omitted.

Java as a desktop front-end language is dead. Sorry. JavaFX is a sad attempt at trying to re-live it, and no one outside of enterprise environments that are pure JVM shops are attempting to use it.

Actually, no, we have used it for a decade and continue to do so, because it is a reasonably clean and performant UI framework that gives us great control and pretty decent platform-native look and feel.

I challenge you to do anything that is first-class profession UI/UX experience in Java, and not want to tear your eyes out in the process. Try building something Aperture, Keynote, etc in Java. I don't know what you're building but my guess is it isn't 'beautiful' or innovative UI.

Re: JDK 8 Release Notes

#308

Earlier quoted context omitted.

Java as a desktop front-end language is dead. Sorry. JavaFX is a sad attempt at trying to re-live it, and no one outside of enterprise environments that are pure JVM shops are attempting to use it.

it's just pining for the fjords. More seriously, as a recent example you will find that what bitcoin.org offers you as the first option for a wallet (multibit) is written in java. That may not be mainstream, but it's definitely not the classic enterprise java shop.

And it looks like it was written in Java. Compare against any serious iOS app, for example.

I've been writing UI code for years, including in Java, .NET, Android/iOS, web, etc, so I have a pretty decent clue about building complex apps in all of these frameworks. Java just isn't a modern environment, and by being cross-platform you end up with an ugly lower common denominator that doesn't have useful APIs for non-trivial designs. iOS is probably the best framework/api out there and even that has many issues (luckily obj-c's categories help you fill in the holes).

Re: JDK 8 Release Notes

#309
post #241
post #6

Earlier quoted context omitted.

>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 this is what groovy and kotlin attempt to do. groovy is backwards compatible with java as well, in most cases java code is valid groovy code.

> groovy is backwards compatible with java as well, in most cases java code is valid groovy code. Whenever I read that meme I get damn suspicious about why java code isn't valid groovy code in all cases. Why only most cases? It all sounds like a recipe for spending half a day debugging simple scenarios where things don't run as intended. To be taken seriously (or as seriously as a language called Groovy can be taken)…

Its mostly things where the java code contains groovy identifiers, but here is a pretty good list: http://stackoverflow.com/questions/687601/valid-java-code-th...

Re: JDK 8 Release Notes

#310

Earlier quoted context omitted.

Actually, no, we have used it for a decade and continue to do so, because it is a reasonably clean and performant UI framework that gives us great control and pretty decent platform-native look and feel.

I challenge you to do anything that is first-class profession UI/UX experience in Java, and not want to tear your eyes out in the process. Try building something Aperture, Keynote, etc in Java. I don't know what you're building but my guess is it isn't 'beautiful' or innovative UI.

True, but how many of us programmers either want or need to do that? Less than 1% I'll bet. For the rest of us, Swing works just fine, and it's a whole lot better than some of the other UI toolkits out there.
Post reply on HN