News for hackers. Stuff that matters.
Re:Modern Java – A Guide to Java 8 by struppi on Monday November 16, 2015 @06:23AM (#10573814)
This is a really nice overview of the new Java 8 features. I like how this tutorial communicates mostly with code snippets and has "read more" links for most topics.

If you are using Java and have not tried Lambda Expressions, method references and default methods, do so now! After that, you'll think "How was I able to live without that?".

I also think that the way Java integrates lambda expressions (via functional interfaces) is really nice. Sure, you have to write some boilerplate code in some scenarios. But since they re-used interfaces and did not event some "function" type (or similar), it fits really nicely into the existing language.

If you don't know Java, this tutorial will probably not be enough - But that probably wasn't the intentian anyway. It's a great intro to what has changed with Java 8 (and all those changes are real improvements for the Java language, IMHO).

Re:Modern Java – A Guide to Java 8 by rifung on Monday November 16, 2015 @07:17AM (#10573966)
If you are using Java and have not tried Lambda Expressions, method references and default methods, do so now! After that, you'll think "How was I able to live without that?"

I think instead of "How was I able to live without that?", people are more likely to exclaim "about time!"

Re:Modern Java – A Guide to Java 8 by struppi on Monday November 16, 2015 @07:28AM (#10574001)
Well... depends on who you ask. I, personally, was more in the "about time!" camp. But I have met several programmers who didn't think they'd need those "newfangled features" at first. Especially in the "early days" of Java 8... And sometimes I still meet people like that. So that scentence was targeting those developers that are still stuck with Java 5 or 6 or 7 and have never tried Java 8.

Also, I was once co-teaching a C# workshop where we showed people how to work with LINQ and extension methods (long, long time ago ;) ). Some participants asked us if there was a way to configure the compiler to forbid those features for their team.

Not everybody likes "modern" features, I guess ;)

Re:Modern Java – A Guide to Java 8 by Cthulhu_ on Monday November 16, 2015 @09:46AM (#10574670)
Well technically they didn't need them, no - I've been working with for and for-in loops for years before learning other languages (like Scala, JS) that had a .map function that could do the same thing but much more compact and expressive. So their argument isn't wholly invalid, and TBF I'd rather see a regular for-in loop than my colleague's atrocious 200-character oneliners.
Re:Modern Java – A Guide to Java 8 by pjmlp on Monday November 16, 2015 @08:46AM (#10574348)
I have that experience with lots of companies:

Very little LINQ usage, usually Java 6 still the latest version on the servers, C++ code older than ANSI C++98....

Re:Modern Java – A Guide to Java 8 by pjmlp on Monday November 16, 2015 @07:25AM (#10573991)
Yep, somewhere at Xerox PARC in the early 80's

    coll := ((1 to: 100) select: [:x| ( x * x ) > 3]) collect: [:x | (x * 2)].
Re:Modern Java – A Guide to Java 8 by netcraft on Monday November 16, 2015 @11:02AM (#10575125)
What language is this exactly? I'd love to research a bit more. Just any search terms to point me in the right direction.
Re:Modern Java – A Guide to Java 8 by kilink on Monday November 16, 2015 @11:11AM (#10575194)
Smalltalk.
Re:Modern Java – A Guide to Java 8 by dschiptsov on Monday November 16, 2015 @08:22AM (#10574248)
And a whole world of Standard ML in the early 90's
Re:Modern Java – A Guide to Java 8 by tootie on Monday November 16, 2015 @09:47AM (#10574675)
Java lambdas are no different than an anonymous Runnable or Callable. It's just nicer syntax.
Re:Modern Java – A Guide to Java 8 by michaelcampbell on Monday November 16, 2015 @10:09AM (#10574804)
> It's just nicer syntax.

Which is mostly the point. Ultimately, everything is no different from <some lower tech thing doing the same thing>.

Re:Modern Java – A Guide to Java 8 by V-2 on Monday November 16, 2015 @05:03PM (#10577566)
Exactly. Everything is just syntax sugar over 0s and 1s :)
Re:Modern Java – A Guide to Java 8 by oldmanjay on Monday November 16, 2015 @10:27AM (#10574923)
they are implemented in a different way, using dynamic invocation. the practical implications of the implementation don't come up too often but they are there, so it's probably good to understand.
Re:Modern Java – A Guide to Java 8 by michaelcampbell on Monday November 16, 2015 @10:08AM (#10574801)
Depends where on the Blub scale you are. For those above java, sure.
Re:Modern Java – A Guide to Java 8 by KfZ on Monday November 16, 2015 @07:16AM (#10573963)
Modern here obviously doesn't mean "Java is modern", but rather "the modern form of Java"
Re:Modern Java – A Guide to Java 8 by struppi on Monday November 16, 2015 @07:26AM (#10573993)
Did you intend to answer to my comment? I never used the word "modern" :)