Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lambdas
#11
They make sense in the case of functional interfaces, but besides that I think they just sacrifice readability for less lines of code.

(01-08-2015, 11:11 PM)DarkStorm Wrote:  
(01-08-2015, 08:22 PM)zooty Wrote:  
(01-05-2015, 07:13 AM)DarkStorm Wrote:  Aside from generics in 1.5, the language really hasn't seen much change for the everyday programmer pre-1.8.

That's because it doesn't need changing.

My entire point in that post is that it does need changing. Something new to the language every so often will be necessary to keep it from being replaced by newer languages with more features and more succinct syntax. If you take a look at the TIOBE index you can clearly see its decline.

Lambdas really aren't a big change tbh, and it's not a change at all when it comes to functionality. The only difference is syntax and afaik (haven't read any info on JVM 1.8 ) it compiles down to almost the same thing.
Reply
#12
I like them, Java has been lagging behind C# in this respect, for simple 1 line foreach loops they're much nicer to use
Reply
#13
(01-27-2015, 05:53 AM)Explicit Wrote:  Lambdas really aren't a big change tbh, and it's not a change at all when it comes to functionality. The only difference is syntax and afaik (haven't read any info on JVM 1.8 ) it compiles down to almost the same thing.

They actually compile down to something significantly different to the equivalent anonymous inner class.  In 1.8, javac makes use of the invokedynamic JVM instruction, which was introduced for scripting languages.

I wrote up a bit about it here, from the point of view of decompilation.

http://www.benf.org/other/cfr/java8lambdas.html
Reply
#14
(02-06-2015, 09:26 PM)lab27 Wrote:  
(01-27-2015, 05:53 AM)Explicit Wrote:  Lambdas really aren't a big change tbh, and it's not a change at all when it comes to functionality. The only difference is syntax and afaik (haven't read any info on JVM 1.8 ) it compiles down to almost the same thing.

They actually compile down to something significantly different to the equivalent anonymous inner class.  In 1.8, javac makes use of the invokedynamic JVM instruction, which was introduced for scripting languages.

I wrote up a bit about it here, from the point of view of decompilation.

http://www.benf.org/other/cfr/java8lambdas.html

I see, maybe I might start using them now thanks to this benefit.
Reply
#15
I like them, stops me from having to make a ton of anonymous classes and saves time. Also makes me feel like a pro gangsta.
Reply
#16
lambdas are OP in my opinion. Make code look shorter and neater. But yeah , everyone has it own preferences.
Reply
 


Forum Jump:


Users browsing this thread: 3 Guest(s)

About The Bytecode Club

We're a community forum focused on Reverse Engineering, we try to target Java/Android but we also include other langauges/platforms. We pride ourselves in supporting and free and open sourced applications.

Website