Hacker News new | ask | show | jobs
Ask HN: Which language to learn (Golang or Scala)?
10 points by nuwin_tim 4149 days ago
Additionally what are the most popular frameworks for those respective languages?
5 comments

I personally love Scala and I wish I could use it for everything including my day job because it has been such a highly productive language. I use it for all of my projects outside of my day job and it has been very fun to learn and to experience how functional programming works. I started out learning Scala from a Java background. I wrote things Scala that mirrored how it would be in Java and slowly transitioned to using more advanced features in Scala.

Popular web frameworks for Scala that I know of are Play Framework, Spray, and Scalatra. Play Framework is my go-to framework because it very powerful and has a lot of functionality that I need and want.

A good resource for learning functional programming concepts in scala is a book called Functional Programming in Scala. The book has taught me a lot and is great at explaining concepts with small exercises along the way.

One great thing about Scala is vast amount of libraries you can tap into. You can use any library that's available in Java in addition to those that are strictly for Scala. Some great libraries for Scala are Akka (concurrency through actor pattern), Slick (SQL library), and Spark (data processing).

I can't say anything about Scala since I haven't played with it, but I like Go a lot. It has a lot of thought put into it to make it a practical language, not a interesting research language. This might seem boring at first, but I find it keeps being rewarding when you use it. The concurrency features baked into the language are also top-notch. They made me like writing concurrent code as opposed to dreading it.

Can I ask what language(s) you already know, if any?

Scala is too complex, only good for (big) data processing. Go is too simple, doesn't support generics/exceptions/inheritance.

Go looks more promising as it's good for writing infrastructures,can attract some ppl/projects away from C/C++/python. But when it comes to complex business softwares, I'd say Java is still the way to go.

You will learn much more with Scala. Go is quite an uninteresting language.
What do you want to make?
A scalable RESTful api service w/ easy to implement versioning, routing, etc.
Take a look at spray.io (Scala) then. The project has been acquired by Typesafe and a new version will soon be integrated into Akka as Akka-HTTP.
then go is the answer, take a look at, https://github.com/gin-gonic/gin