It's a fairly accurate predictor of a company downturn after getting sunk in total complexity and ensuing certain employee churn.
The only reason for Scala adoption was Spark 10 years ago. Scala/Spark engineers were pulling the top buck. With pyspark and other cloud big data options on the scene, no one sane is using scala for this anymore.
Plus, the cost of teaching Scala to your new hires means they won't be productive for literally _months_
I agree that other big data tooling providers are eating into spark but I'm surprised people are choosing python over Scala for Spark.
I think F# is doing much better in this category.
Scala can surprise you many unexpected ways. https://www.youtube.com/watch?v=v1wrWQcqLpo
But other than that, Scala is miles ahead. And if you want to do pure FP, then Scala is the only option.
Also about that video, almost all of the points mentioned are either not available in other languages like F# anyways, or they already fixed in the latest Scala version.
I don't think that Scala is especially good for "pure FP".
I also do not want to do "pure FP".
I meant when compared to F#. Of course there are other languages for FP as well.
> I also do not want to do "pure FP".
That's your choice!
Could you elaborate? Because that's not been my experience at all. I have found Scala to provide many tools to wrap around the idiosyncrasies of the underlying imperative that they are barely noticeable anymore.
In the video Paul Phillips elaborates on many subject much better than I could ever do.
I also found the .net ecosystem libraries better, even though there are fewer libraries available.
Some links that I found great on the subject:
https://www.reddit.com/r/scala/comments/4246qc/heres_why_sca...
https://techblog.bozho.net/i-dont-like-scala/
To be honest with you my social circle of software engineers gave up Scala long time ago and we do not even consider it to try it ever again. Most of the projects we do we simple use Java for JVM (since version 8 there are many useful features that you can use and have relatively terse code that is also easy to read) for the .net ecosystem we use C# of F# depending on how relaxed the engineering team and the stakeholders about it.
For data engineering (ETLs, glue code, etc.) Python works. Since Spark has a Python interface it is also not needed to use Scala there.
For frontend obviously Scala was probably never a serious option.
There is no use for Scala for me or for the companies I work for. The last time I tried Scala it was horrendous. SBT? Seriously? Binary incompatibility between minor versions? I could go on an on of the collection of anti-patterns I have encountered. Since I have limited time and there are a ton of other software environments that we can use and have much better experience why on Earth would I want to waste time on Scala ever again?
SBT is awful, don't use it.
"Minor versions" is overstating things - 2.11 was released in 2014, 2.12 was released in 2016, 2.13 in 2019, and 3.0 onwards are backwards compatible with 2.11. So that's one compatibility break every 2-3 years, which is better than most languages.
Scala is the only vaguely mainstream language I've found where you can do a whole enterprise-scale project in the language itself - no reflection, no AOP, no decorators, no macros, no monkeypatching, no nothing. So until I find another language where I can do custom context-like types (e.g. a type to represent "this must happen in a database transaction", and libraries already offer me functions like "take this list of database actions and combine them into a single database action" that work with my custom type) and "walk the object graph" style tasks (e.g. JSON serialization) in plain old type-safe code, I'm sticking with Scala.
Thanks for elaborating your point of view.
And when I say Scala, I mean libraries like akka http, spray-json and slick. I like FP parts of Scala overall.
You would think that Scala 3 released in 2021 would have first class net/http and json that we can get rid of spray json. But no.
I think at some stage specialists from some Akka pro shop had to be air dropped in to try fix it all, but it didn't help much.
It always made me laugh how well all the services written in Python and Go worked and how easy they were to extend, operate and deploy comparatively.
Is the business problem not suited to the actor model in the first place?
Cats et al are frequently abused - 90% of the time rather than using a complex tool to solve a complex problem you want to think about it a bit and simplify it. But when you need them they do things that you can't do any other way, and they're vastly better than the reflection/AOP/bytecode-manipulation that people use to solve the same problem in Java or Kotlin.
I've inherited and built some actor based applications and libraries, both in Erlang and .NET (via Akka.NET). Usually these systems are:
- heavily Domain/event driven
- have 'funnel points' (example; bids on specific cars)
- have strong (but not extreme) requirements around consistent, fast response.
- be reasonably maintainable without a whole lot of gotchas
In all cases the actor model was the easiest way to solve the problems presented. That last point may be a bit contentious, but what every shop I've been at has found that while sometimes domain evolution results in extra boilerplate code to handle different versions of events, it is usually not the same sort of nightmare to do larger redesigns of the system as it ages and needs evolve.
> Every time I saw Akka used, replacing it with straightforward Futures-and-for/yield code was an improvement.
I'll admit I've over-used Akka.NET from time to time. I'd say the most overkill case is 'I need background workers running on timers with automatic recovery.'
Can’t speak to category theory. Not familiar with it, but I have done my fair share of “reflection metaprogramming” that might get me me shot (dynamically constricting and using generic types through reflection gets pretty nasty).
How frequently do these need to change?
The problem with the library landscape is that one library will be promoted by the purists and another by the company with the money. Suddenly you have to learn both to understand Scala codebases.
If anything, you should be saying things like Shapeless provide the extra complexity.
Now that says something about the Scala ecosystem. Doesn't it?
I'm comparing this to how easily I can do the same task in nodejs and Go.
This isn't about the type system. This is about complicating things by making everything FP while getting nothing in return.
But I'm keen to learn more :) I always prefer compile time to run time errors.
https://circe.github.io/circe/codecs/auto-derivation.html is one popular library that does this - note that the `.asJson` will fail at compile time if you add a member to Greeting or Person whose type can't be serialized/deserialized (e.g. File or Lock or something) i.e. one that doesn't have an Encoder typeclass instance available.
can never convince the FP purists to let you use a non FP library.