Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java 8 vs. Groovy - Functional Programming  RSS feed

 
Francisco Llaryora
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.
 
Richard Warburton
Author
Greenhorn
Posts: 22
7
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!