5 ms·
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 to
by struppi 11y ago
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).
- KfZ 11y agoModern here obviously doesn't mean "Java is modern", but rather "the modern form of Java"
- struppi 11y agoDid you intend to answer to my comment? I never used the word "modern" :)
- rifung 11y agoIf 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!"
- pjmlp 11y agoYep, somewhere at Xerox PARC in the early 80's coll := ((1 to: 100) select: [:x| ( x * x ) > 3]) collect: [:x | (x * 2)].
- dschiptsov 11y agoAnd a whole world of Standard ML in the early 90's
- netcraft 11y agoWhat language is this exactly? I'd love to research a bit more. Just any search terms to point me in the right direction.
- kilink 11y agoSmalltalk.
- deleted 11y ago[deleted]
- struppi 11y agoWell... 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 ;)
- pjmlp 11y agoI 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....
- Cthulhu_ 11y agoWell 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.
- tootie 11y agoJava lambdas are no different than an anonymous Runnable or Callable. It's just nicer syntax.
- michaelcampbell 11y ago> It's just nicer syntax. Which is mostly the point. Ultimately, everything is no different from <some lower tech thing doing the same thing>.
- V-2 11y agoExactly. Everything is just syntax sugar over 0s and 1s :)
- oldmanjay 11y agothey 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.
- michaelcampbell 11y agoDepends where on the Blub scale you are. For those above java, sure.