Slashdot Mirror


Slashdot Asks: What Are Your Favorite Java 8 Features? (infoworld.com)

New submitter liveedu shares with us a report from InfoWorld: When Java 8 was released two years ago, the community graciously accepted it, seeing it as a huge step toward making Java better. Its unique selling point is the attention paid to every aspect of the programming language, including JVM (Java Virtual Machine), the compiler, and other help-system improvements. Java is one of the most searched programming languages according to TIOBE index for July 2016, where Java ranks number one. Its popularity is also seen on LiveCoding, a social live coding platform for engineers around the world, where hundreds and thousands of Java projects are broadcasted live. InfoWorld highlights five Java 8 features for developers in their report: lambda expressions, JavaScript Nashorn, date/time APIs, Stream API and concurrent accumulators. But those features only scratch the surface. What makes Java 8 amazing in your opinion? What are your favorite Java 8 features that help you write high quality code? You can view the entire list of changes made to the programming language here.

5 of 427 comments (clear)

  1. Java? by Anonymous Coward · · Score: 0, Troll

    Arrgghh, no thank you?

    1. Re:Java? by KiloByte · · Score: 1, Troll

      Many places use Cobol, and even more use Windows, too. That people use either doesn't mean Java is the right tool for the job. Any job (maintaining existing code notwithstanding).

      Need it OS independent? Use Java.

      Contrary to what Oracle's marketing dept says, in the real world even C is more portable.

      User interfaces (GUI, WEB you name it) it's great.

      I have no experience with Java on a web server, but after trying to use a few GUI programs in Java, sorry, no. It's a major pain in the ass to deploy: every single program needs a specific version of Java with specific configuration oddities, and even then there's no guarantee of success. And if you manage to start the program, expect crashes, ages-long startup, insane memory use, frequent pauses or outright lockups.

      It's OK for data processing, but you will need lots of compute resources compared to the same thing in C++.

      In other words, it's not OK. I'd understand if it was faster to write in Java than C++ -- after all, we don't use assembly for most tasks despite it being faster -- but you make your compute task being slower for no gain.

      Don't like the "hard work" involved in memory management, Use Java and restart often.

      Say what? If I wanted required restarts, I'd use Windows. Sorry but "reboot/restart often" is. not. acceptable., period.

      It's hard to leak any memory in Perl or Python, and it's a rare thing in C++ unless you're a doofus.

      --
      The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
  2. Not having java by Anonymous Coward · · Score: 0, Troll

    Yup that the best option

  3. So what would you use? by aberglas · · Score: 0, Troll

    C/C++ was a joke when first produced long ago. Archaic technology obsolete before it was produced.

    JavaScript/Python etc. No static typing. Great until you get over 1000 lines of code. Also, Java compiles to binary, runs as fast (sometimes faster) than C. .Net. Technically better than Java in every way ... as long as you like windows.

    There is a need for a light weight, garbage collected language with static typing an efficient compilation, but it does not exist. So Java it is.

    Unless you like staying up all night tracking down errors in pointer arithmetic.

    1. Re:So what would you use? by Joce640k · · Score: 1, Troll

      Exactly. However, Java is pretty damn lightweight and efficient nowadays -- a heck of a lot less heavy than many alternatives.

      People have been saying that since before Hotspot - 20 years ago.

      Repeating something often enough doesn't make it true.

      --
      No sig today...