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!"
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 ;)
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.
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....
Yep, somewhere at Xerox PARC in the early 80's
coll := ((1 to: 100) select: [:x| ( x * x ) > 3]) collect: [:x | (x * 2)].What language is this exactly? I'd love to research a bit more. Just any search terms to point me in the right direction.
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
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>.
Exactly. Everything is just syntax sugar over 0s and 1s :)
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.
Modern here obviously doesn't mean "Java is modern", but rather "the modern form of Java"
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).