This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action 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
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Java 8 vs Scala

 
Ranch Hand
Posts: 458
Scala jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you think Java can catch up with Scala in terms of functional programming? Are lambdas enough to stop developers deserting Java for other jvm languages?
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no
 
Sheriff
Posts: 21842
105
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Care to elaborate on that "no"? Because I could say "yes" and it would be just as meaningless. (I'm not saying yes or no, I haven't even given this any thought.)
 
Rancher
Posts: 436
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Will Myers wrote:Are lambdas enough to stop developers deserting Java for other jvm languages?



Are they in significant numbers (not in loudness by the ones gone)? Is that the (a) problem Java 8 wants to solve? (That are real, non rhetoric questions.)
 
Andreas Scheucher
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, for my sloppy answer. But I could not resist.

I do not have the numbers, how many Java developers left for other languages. And actually, I am not really interested in them.
Can only speak for myself. If I can choose, I prefere Scala over Java in meantime. I produce code, which is less error prone, then in Java. Mainly because of the usage of immutable data.
 
Author
Posts: 22
7
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Will Myers wrote:Do you think Java can catch up with Scala in terms of functional programming? Are lambdas enough to stop developers deserting Java for other jvm languages?



Hi Will,

Thanks for your question - I guess it depends on what you mean by "catch up". Scala has a lot of language features that Java doesn't have.

Some of those features are useful and help reduce boilerplate within common programming patterns or make it easier to "do the right thing". The obvious example to me here is case classes. A basic value type with fields, value equality, value-based hashcode etc. is a common thing to want in programming. Its something that would help probably help Java programmers and when I speak to developers about Scala it is something that seems almost universally popular. At the library level the immutable collections of Scala are a nice addition as well. On the other hand Scala adds a lot of baggage and complexity and slow compile times etc.

So I don't think the right mentality for Java's evolution is to view Scala as being the future and try to catch up. I think the right answer is to view it as a large scale experiment in language design. There's some good ideas, there are some failures. The good ideas should be rapidly adopted and the failures avoided.

Some developers are definitely moving on from Java to other languages and some new developers are always arriving into the Java ecosystem. So I'm not that personally that worried about whether a specific feature can improve Java's popularity or not. I don't think lambda expressions are enough on their own. I think the best way to maintain Java's popularity as a development environment is to continue to invest in and evolve the language, core libraries and the JVM. Lambdas/Streams/Collectors are a great addition but they shouldn't be considered the end of the line for Java's evolution - just the latest step.

thanks,

Richard
 
It's a tiny ad only because the water is so cold.
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!