This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Java 8 vs. Groovy - Functional Programming

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
F is for finger. Can you stick your finger in your nose? Doesn't that feel nice? Now try this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic