• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

can java 1.8 compete with other functional programing languages.

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Venkat

java 1.8 functional programmin capabilities are limited to other languages like Scala or Lisp.
do you think java 1.8 is efficient as others ?
 
Author
Posts: 109
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kerim,

I was very lukewarm about lambdas in Java 8, but all the changed when I looked under the hood.

Java 8 lambdas make really great use of invokedynamic. In Java 7 invokedynamic was originally introduced to help dynamically typed languages.
Soon the designers of Java realized that compiling lambdas to inner classes is not going to help. It was quite a surprise that they finally decided to
reimplement invokedynamic in a way that the biggest user of this feature now is Java.

So, one efficiency comes from invokedynamic. The other efficiency comes from the lazy evaluation capability built into Streams.

Take a look under the hood, run some prototypes, and see how it measures up.

Thanks,

Venkat
 
Ranch Hand
Posts: 782
Python Chrome Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While Streams are a very powerful feature, there are not enough resources that teach people how to implement their own Spliterators that can be parallelized.
 
Whose rules are you playing by? This tiny ad doesn't respect those rules:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic