Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Java 8 vs. Groovy - Functional Programming

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to all!

For some time, the language groovy is used to teach the benefits of functional programming.
What is the advantage of using java 8 over languages ​​like groovy/scala?

Thank you,
Francisco.
 
Author
Posts: 31
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Francisco Llaryora wrote:Hi to all!

For some time, the language groovy is used to teach the benefits of functional programming.
What is the advantage of using java 8 over languages ​​like groovy/scala?

Thank you,
Francisco.



Hi Francisco,

I've used Scala and Groovy a bit for functional programming things and I've generally found them to be pretty good. I think its hard to put my finger on something that makes the Java the language better than scala or groovy, but there's quite a few things at the platform level.

* IDE/Build Tool support - whenever I've used either groovy or scala I've run into quite a number of bugs or missing features in IDE and build systems. To my mind its great that Java 8 lets you continue to use the mature and well supported Java ecosystem while getting some functional programming support.
* Type systems - Scala has quite a sophisticated and powerful type system, but I've found a lot of people get confused by the complexity this brings compared to Java. I personally value static typing quite a bit, so for me I'd count that as a positive over traditional groovy. Groovy 2.0 brings static typing but especially on the early releases I've hit a number of bugs which hurt productivity.
* Streams - Scala has had a lot of operations on collections, similar to the style of parallel streams but there are numerous issues. There's a great talk at http://www.youtube.com/watch?v=uiJycy6dFSQ which goes into a lot of these problems. I think the parallel decomposition and performance issues have been thought through a lot better in the Java 8 streams library.

regards,

Richard
 
    Bookmark Topic Watch Topic
  • New Topic