Need advice about which tool to choose?Ask the StackShare community!

Groovy

6.9K
774
+ 1
212
Scala

11.7K
7.6K
+ 1
1.5K
Add tool

Groovy vs Scala: What are the differences?

Developers describe Groovy as "A dynamic language for the Java platform". Groovy builds upon the strengths of Java but has additional power features inspired by languages like Python, Ruby and Smalltalk. It makes modern programming features available to Java developers with almost-zero learning curve. On the other hand, Scala is detailed as "A pure-bred object-oriented language that runs on the JVM". Scala is an acronym for “Scalable Language”. This means that Scala grows with you. You can play with it by typing one-line expressions and observing the results. But you can also rely on it for large mission critical systems, as many companies, including Twitter, LinkedIn, or Intel do. To some, Scala feels like a scripting language. Its syntax is concise and low ceremony; its types get out of the way because the compiler can infer them.

Groovy and Scala belong to "Languages" category of the tech stack.

"Java platform" is the top reason why over 38 developers like Groovy, while over 177 developers mention "Static typing" as the leading cause for choosing Scala.

Groovy and Scala are both open source tools. It seems that Scala with 11.8K GitHub stars and 2.75K forks on GitHub has more adoption than Groovy with 1.49K GitHub stars and 414 GitHub forks.

According to the StackShare community, Scala has a broader approval, being mentioned in 437 company stacks & 324 developers stacks; compared to Groovy, which is listed in 79 company stacks and 73 developer stacks.

Advice on Groovy and Scala
Needs advice
on
ClojureClojure
and
ScalaScala

Basically, I am looking for a good language that compiles to Java and JavaScript(and can use their libraries/frameworks). These JVM languages seem good to me, but I have no interest in Android. Which programming language is the best of these? I am looking for one with high money and something functional.

Edit: Kotlin was originally on this list but I removed it since I had no interest in Android

See more
Replies (3)
Recommends
on
ScalaScala

Clojure is a Lisp dialect, so if you like Lisp that's probably the way to go. Scala is more popular and broadly used, and has a larger job market especially for data engineering. Both are functional but Scala is more interoperable with Java libraries, probably a big factor in its popularity. I prefer Scala for a number of reasons, but in terms of jobs Scala is the clear leader.

See more
Recommends
on
ScalaScala

Scala has more momentum. It is good for back-end programming. The popular big data framework Spark is written in Scala. Spark is a marketable skill.

If you need to program something very dynamic like old school A.I., Clojure is attractive. You would chose Scala if prefer a statically typed language, and Clojure if you prefer a dynamically typed language.

See more
ivanopagano
Senior Consultant at scalac.io · | 1 upvotes · 28.4K views
Recommends

It's not clear exactly what you mean by "high money", you mean financial support to the language, money paid for a job, economic health of the market the language is positioned on?

In any case, it's very hard to give any advice here, since you'd need to provide details on the intended usage, what sector, kind of product/service, team size, potential customer type... Both languages are very general purpose and decently supported, each have its own pros and cons, both are functional as approach, and neither is really mainstream.

See more
Needs advice
on
GolangGolangNode.jsNode.js
and
ScalaScala

Finding the best server-side tool for building a personal information organizer that focuses on performance, simplicity, and scalability.

performance and scalability get a prototype going fast by keeping codebase simple find hosting that is affordable and scales well (Java/Scala-based ones might not be affordable)

See more
Replies (1)
David Annez
VP Product at loveholidays · | 5 upvotes · 290.8K views
Recommends
on
Node.jsNode.js
at

I've picked Node.js here but honestly it's a toss up between that and Go around this. It really depends on your background and skillset around "get something going fast" for one of these languages. Based on not knowing that I've suggested Node because it can be easier to prototype quickly and built right is performant enough. The scaffolding provided around Node.js services (Koa, Restify, NestJS) means you can get up and running pretty easily. It's important to note that the tooling surrounding this is good also, such as tracing, metrics et al (important when you're building production ready services).

You'll get more scalability and perf from go, but balancing them out I would say that you'll get pretty far with a well built Node.JS service (our entire site with over 1.5k requests/m scales easily and holds it's own with 4 pods in production.

Without knowing the scale you are building for and the systems you are using around it it's hard to say for certain this is the right route.

See more
Decisions about Groovy and Scala
Frank Neff

We're moving from Java to Kotlin with our Microservice Stack (Spring Boot) because it is excellently supported by framework and tools and the learning curve is not very steep Kotlin is way more straightforward and convenient to use while providing less boilerplate and more strictness, which finally leads to better code, which is more readable, maintainable and less error-prone. We especially like Kotlin's (functional) data structures, which are, e.g. compared to Scala, easier to understand and don't require deep knowledge in functional programming.

See more
Chose
PythonPython
over
ScalaScala

I am working in the domain of big data and machine learning. I am helping companies with bringing their machine learning models to the production. In many projects there is a tendency to port Python, PySpark code to Scala and Scala Spark.

This yields to longer time to market and a lot of mistakes due to necessity to understand and re-write the code. Also many libraries/apis that data scientists/machine learning practitioners use are not available in jvm ecosystem.

Simply, refactoring (if necessary) and organising the code of the data scientists by following best practices of software development is less error prone and faster comparing to re-write in Scala.

Pipeline orchestration tools such as Luigi/Airflow is python native and fits well to this picture.

I have heard some arguments against Python such as, it is slow, or it is hard to maintain due to its dynamically typed language. However cost/benefit of time consumed porting python code to java/scala alone would be enough as a counter-argument. ML pipelines rarerly contains a lot of code (if that is not the case, such as complex domain and significant amount of code, then scala would be a better fit).

In terms of performance, I did not see any issues with Python. It is not the fastest runtime around but ML applications are rarely time-critical (majority of them is batch based).

I still prefer Scala for developing APIs and for applications where the domain contains complex logic.

See more

We needed to incorporate Big Data Framework for data stream analysis, specifically Apache Spark / Apache Storm. The three options of languages were most suitable for the job - Python, Java, Scala.

The winner was Python for the top of the class, high-performance data analysis libraries (NumPy, Pandas) written in C, quick learning curve, quick prototyping allowance, and a great connection with other future tools for machine learning as Tensorflow.

The whole code was shorter & more readable which made it easier to develop and maintain.

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Groovy
Pros of Scala
  • 44
    Java platform
  • 33
    Much more productive than java
  • 29
    Concise and readable
  • 28
    Very little code needed for complex tasks
  • 22
    Dynamic language
  • 13
    Nice dynamic syntax for the jvm
  • 9
    Very fast
  • 7
    Can work with JSON as an object
  • 7
    Easy to setup
  • 6
    Supports closures (lambdas)
  • 6
    Literal Collections
  • 3
    Syntactic sugar
  • 3
    Optional static typing
  • 2
    Developer Friendly
  • 187
    Static typing
  • 178
    Pattern-matching
  • 177
    Jvm
  • 172
    Scala is fun
  • 138
    Types
  • 95
    Concurrency
  • 88
    Actor library
  • 86
    Solve functional problems
  • 81
    Open source
  • 80
    Solve concurrency in a safer way
  • 44
    Functional
  • 24
    Fast
  • 23
    Generics
  • 18
    It makes me a better engineer
  • 17
    Syntactic sugar
  • 13
    Scalable
  • 10
    First-class functions
  • 10
    Type safety
  • 9
    Interactive REPL
  • 8
    Expressive
  • 7
    SBT
  • 6
    Case classes
  • 6
    Implicit parameters
  • 4
    Rapid and Safe Development using Functional Programming
  • 4
    JVM, OOP and Functional programming, and static typing
  • 4
    Object-oriented
  • 4
    Used by Twitter
  • 3
    Functional Proframming
  • 2
    Spark
  • 2
    Beautiful Code
  • 2
    Safety
  • 2
    Growing Community
  • 1
    DSL
  • 1
    Rich Static Types System and great Concurrency support
  • 1
    Naturally enforce high code quality
  • 1
    Akka Streams
  • 1
    Akka
  • 1
    Reactive Streams
  • 1
    Easy embedded DSLs
  • 1
    Mill build tool
  • 0
    Freedom to choose the right tools for a job

Sign up to add or upvote prosMake informed product decisions

Cons of Groovy
Cons of Scala
  • 3
    Groovy Code can be slower than Java Code
  • 1
    Absurd syntax
  • 1
    Objects cause stateful/heap mess
  • 11
    Slow compilation time
  • 7
    Multiple ropes and styles to hang your self
  • 6
    Too few developers available
  • 4
    Complicated subtyping
  • 2
    My coworkers using scala are racist against other stuff

Sign up to add or upvote consMake informed product decisions

What is Groovy?

It is a powerful multi-faceted programming language for the JVM platform. It supports a spectrum of programming styles incorporating features from dynamic languages such as optional and duck typing, but also static compilation and static type checking at levels similar to or greater than Java through its extensible static type checker. It aims to greatly increase developer productivity with many powerful features but also a concise, familiar and easy to learn syntax.

What is Scala?

Scala is an acronym for “Scalable Language”. This means that Scala grows with you. You can play with it by typing one-line expressions and observing the results. But you can also rely on it for large mission critical systems, as many companies, including Twitter, LinkedIn, or Intel do. To some, Scala feels like a scripting language. Its syntax is concise and low ceremony; its types get out of the way because the compiler can infer them.

Need advice about which tool to choose?Ask the StackShare community!

What companies use Groovy?
What companies use Scala?
See which teams inside your own company are using Groovy or Scala.
Sign up for StackShare EnterpriseLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with Groovy?
What tools integrate with Scala?

Sign up to get full access to all the tool integrationsMake informed product decisions

Blog Posts

GitJenkinsGroovy+4
4
2633
Aug 28 2019 at 3:10AM

Segment

PythonJavaAmazon S3+16
7
2551
DockerAmazon EC2Scala+8
6
2705
What are some alternatives to Groovy and Scala?
Java
Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!
Kotlin
Kotlin is a statically typed programming language for the JVM, Android and the browser, 100% interoperable with Java
Python
Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
Gradle
Gradle is a build tool with a focus on build automation and support for multi-language development. If you are building, testing, publishing, and deploying software on any platform, Gradle offers a flexible model that can support the entire development lifecycle from compiling and packaging code to publishing web sites.
Grails
Grails is a framework used to build web applications with the Groovy programming language. The core framework is very extensible and there are numerous plugins available that provide easy integration of add-on features.
See all alternatives