7 ms·
Ask HN: Should I be learning Scala in 2019?
So, I'm mostly a .NET and Node.js guy (with front-end experience as well). I wanted to branch into the Java ecosystem but having prior experience in Java, I was not a fan of the syntax.
I have heard a lot about Scala and I decided to jump into that (without enough research). I got a Scala book and I'm about a 100 pages in and I must say I do like the language, its seems very interesting and productive to me thus far. However I decided to google about language usage, future and jobs.
The results weren't very motivating and now I'm doubting whether I should keep going? Are companies choosing Scala nowadays for new projects? (not talking about legacy systems)
- scarface74 8y agoWhat’s your end result? If you are focused on career based learning, there are a lot more jobs out there for pure Java development and Kotlin is picking up serious steam especially when it comes to Android development. Besides if you already a .Net developer, you’re probably already using JetBrains R#. They are behind Kotlin and the best IDE for it. I’m also not a Java fan for a lot of reasons but the syntax of Java is not that far from C# that I could see liking one and hating the other.
- sidcool 8y agoMy answer is Yes. There is still a lot of momentum behind Scala. It's pure functional structures are way more mature than Java's. The most common complaints against Scala are build tools and compiler. A great team is working on it as we speak. Scala also forces you to think differently.
- pjmlp 8y agoEven if you end up not using it for anything in production, it is always worthwhile to learn new programming languages, how they approach solving problems and structuring programs. It opens our mind to new ways to architecture our software.
- scarface74 8y agoAssuming that you don’t have other obligations like family, hobbies, etc. I specifically optimize the limited amount of free time I have to devote to career self improvement to what is going to help me be more competitive in the job market.
- pjmlp 8y agoHaving the skills of being able to bring new ideas into existing software stacks, without forcing the business to lose money with yet another rewrite of the month, is exactly one way of being more competitive in the job market.
- scarface74 8y agoFor example, if I wanted to bring the ideas of functional programming to a C# shop, why not just learn the concepts of functional programming in C#? On top of that, if there is a standard way to structure a program in a given language, you’re not doing future developers and maintainers any favors by not following the paradigms of that language or “you can write COBOL in any language”. When I’m writing on Python, I try to do things in the “Pythonic” way. The same with JS or C#.
- pjmlp 8y agoLets take Python as example. async/await only came to it after the success it had on .NET. So one could have toyed with async/await in C#, and now already understand some best practices to apply in Python. Or read the Osaki's book on persistent data structures and implement similar ones in a Python library for concurrent code in Python. Or maybe one has spent a couple of days learning about OCaml and Haskell, and is in a better position to understand how to make better use of list and generator comprehensions or itertools package. Of course one also has the choice of only eating what is on the plate, without understanding the variations that the same ingredients allow for.
- scarface74 8y agoThe question is, who has the time? I already have a two to three year agenda to improve up the stack ($cool_kids_front_end framework of the week), down the stack (AWS cloud infrastructure from a developer, infrastructure, devops viewpoint), more breadth at certain levels (get better at Python, big data, ElasticSearch and Kibana) and staying fluent when it comes to architecture (scalability, high availability, security, etc). Why would I take the time that doesn’t help in that goal? I don’t need to be an expert in all of those areas, but I at least need to be good at some, average at some, and be conversant in other areas to at least know the what if I don’t know the how to be able to command higher than market salaries as either “adult supervision” at smaller companies or an overpriced consultant - and I am not talking about Silicon Valley/West coast salaries.
- ochronus 8y agoAs everything: that depends. In general it's a good mindset change after .NET (well, unless you're doing F#) so it both grows your ways of thinking and your repertoire. If you have limited time to learn and you're doing it for a new job, the equation might be different.
- spir 8y agoThis link compares search volume for Scala, Rust, and Kotlin for past 12 months in U.S. https://trends.google.com/trends/explore?geo=US&q=%2Fm%2F091hdj,%2Fm%2F0dsbpg6,%2Fm%2F0_lcrx4 https://trends.google.com/trends/explore?geo=US&q=%2Fm%2F091... (Scala wins by a large margin!) Awhile ago I chose Scala for a multi-year side project. I love writing Scala. I think the Scala community is quietly productive and mostly talks to themselves. I'm not a Scala expert by any means, but I have have been programming for awhile and appreciate the power and terseness that comes out of my Scala code. It feels like I have more time to design well because I needn't write so much code :P. Going to attempt a good/bad/ugly for Scala... Good: - Scala ecosystem very much under active development. Scala 3.0, compilation speed improvements, popular libraries updated regularly, IDE integration (VSC is recommended right now I think) - Powerful. Scala's type system is relatively advanced. If used properly I think this can reduce bugs and cost of maintenance and new features. - Fast and portable. jvm! Bad: - Scala's relatively slow compilation reduces cycle time, but I find often this is mitigated by confidence in the code I'm writing, so I don't often need to stop and run it to ensure correctness. - Very high learning curve to wield the power effectively. Scala is an ecosystem that demands commitment. For example, sometimes I feel like I'm missing the requisite PhD to get the sbt build tool working properly. Ugly: - Due to Scala's power and high learning curve, a few failure modes may occur that make Scala impractical for many real-world software teams: Scala/functional experts can write a "Russian doll" of abstractions that's hard for someone less experienced to decipher, code review, or maintain; new team members who are also new to Scala/functional may have to ramp up with both business/codebase and functional concepts; and Scala gives you so many different "ways" to solve the same problem that code styles may diverge even in a small team, increasing cost and risk. Overall I really love Scala, am looking forward to Scala 3.0, and intend to use it for many years, especially for projects with small, experienced teams where Scala's power and learning curve is an asset and not a liability.
- kotrunga 8y agoJust for comparison... see the same query, with Go and JavaScript added in. https://trends.google.com/trends/explore?geo=US&q=%2Fm%2F091hdj,%2Fm%2F0dsbpg6,%2Fm%2F0_lcrx4,%2Fm%2F09gbxjr,%2Fm%2F02p97 https://trends.google.com/trends/explore?geo=US&q=%2Fm%2F091... I'd like to learn Scala too. At the moment it's definitely not as prevalent as other languages, but it's higher than emerging languages, which I think was @spir's goal. I didn't add this to invalidate the parent comment; just to add another view.
- bmancer 8y agoTry Kotlin
- securingsincity 8y agoI think it is worth it to learn the functional aspects. Depending on other things you would want to explore there are some great libraries - Building reactive systems with Akka or data analysis/pipelines with Spark. I would suggest looking at a few books to get going with Scala as online resources aren't great. - Functional Programming in Scala - Akka In Action
- jibanes 8y agowhich book did you get?
- mruts 8y agoI love scala, it’s probably my favorite language. It’s one of the most flexible and powerful languages I’ve ever come across. The downside of this is that it very complicated, I wouldn’t consider myself anywhere close to an expert even after developing with it professionally over 5 years. In regards to new projects, I do believe people are using it for new stuff. Both Spark and Akka are very powerful libraries that have little parallel in other languages. Imo, Scala is the most advanced language on the jvm, far outclassing Kotlin, Clojure, and Java in terms of expressiveness. I would recommend learning it and playing around with Spark. I think the combination is very employable. Also, Scala is so much fun! I love it!
- dev_dull 8y ago> Imo, Scala is the most advanced language on the jvm, far outclassing Kotlin, Clojure, and Java in terms of expressiveness. Exactly why I don’t want any new scala code on my team. We don’t need engineers spending three days arguing about pedantic differences in the language because something can be done 8 different ways. And who wants to maintain something in scala that they didn’t write? It’s a nightmare.
- mruts 8y agoI mean, as long as everyone agrees to use purely functional constructs and heavy use of monadic intetfaces, I haven’t found it a problem. Without mutability and with referential transparency for all structures, I think it’s fine. The problem is when you have a Java guy on the team who writes crap OO code. That’s when it becomes impossible to reason about. We had a rule on my last scala dev team that if you wanted to use a var or a structure from collection.mutable, you had to give a presentation on why it was necessary.
- nuclx 8y agoThat sounds a bit reductionist, as if 'heavy use of monadic interfaces' would be kind of a silver bullet. There's a lot of concepts to internalize before being able to build large scale systems using categorical abstractions: Monads, monad transformers, free monads, applicatives, arrows, ... When to choose what? Probably leave the choice to library-implementors mostly. Still, should the bar to implement a library be set so high? The middle ground seems to be what e.g. Rust is doing. No explicit categorical types, use functions where functions make sense, i.e. for most stuff that isn't I/O.
- segmondy 8y agoYou should be learning how to answer these questions yourself. Part of growing up as a programmer is being able to answer. What language should I learn, what framework/library should I learn, what project should I work on. Everyone is different, with different background and goals. You must learn to figure out where you are and where you're going and then answer the question for yourself. There has never been a better time to learn Scala for at least one programmer out there and at the same time, it could be the worst mistake another could make right now.
- happythought 8y agoIn my opinion, your criticism is unwarranted here. Asking about the job market for a language on HN is completely valid and doesn’t signal an inability for OP to answer the question on their own.
- fmjrey 8y agoIf you only care about marketability on the backend side, then scala is certainly a fair choice. The difficulty with scala is the complexity of the language itself. If you want to improve your own thought process rather than your skill in just one programming language, then clojure(script) would be a better choice. Once you've been through the learning and practice curve, the benefits of having decomplected your mind will spill to other languages.
- indemnity 8y agoI lead a team who rewrote their stack from C#/C++/Win to Java/C++/Node. Big wins were being able to leverage the much larger ecosystem, and containerization. We played with Scala but it didn’t work for our team, the expressivity is a two edged sword. Runtime is absolutely fine though it was all about complexity, and poor developer tooling. And since we are in a smaller market, not SV, sticking to platforms where we can find hires was probably a better call for our company.
- scarface74 8y agoWhat big win did you get from moving from C# to Java that you wouldn’t get just from moving to .Net Core?
- fxfan 8y agoCheap coders?
- scarface74 8y agoIt seems like it. If there only goal was to move from Windows, they spent a lot of money rewriting their whole stack instead of just migrating to .Net Core.
- Matthias247 8y ago> I wanted to branch into the Java ecosystem but having prior experience in Java, I was not a fan of the syntax. Independent of the question around Scala: If you want to get into the JVM ecosystem, you should also be able to understand and write Java. Some dependencies will not be available natively in a secondary language like Scala. And it will also give a better understanding about the limitations of the underlying platform.
- dikei 8y agoThis. Almost all libraries and their example/documentations will be written in Java, so you have to learn Java if you want to use other language in the JVM.
- cutler 8y agoHere in the UK and London demand for Scala is very close to the demand for Ruby. If you search Indeed.co.uk by title there are around 162 jobs each for Scala and Ruby in the UK, with 65 for Go. Scala's other rival is non-Android Kotlin which has only recently edged into double figures.
- djinnandtonic 8y agoIf you want to branch into Java, learn Java. More importantly, why do you want to branch into Java specifically? Is there a company/job you have your eye on? Or do you want to get into web dev backend? Because there are so many, many languages/technologies out there, asking "should I learn X?", the answer is always "if you like it or it'll get you a job you want, yes"
- vkaku 8y agoScala is good, but I haven't seen it being used as much as it was popular a few years ago. It may die with a handful of loyal users, sadly; I bought the new Scala book myself and it's gathering dust. You may want to check out F# if you're looking for a .Net functional language. Or try out Haskell.
- jarjarbinks455 8y agoIf the goal is access to a wider job market then learn regular Java. It's the most popular JVM lang now and likely to remain so for decades.