I have used python and scala for work and I find myself wishing to be able to use scala a lot when I use python (especially when using pandas or trying to multi process/thread). Not so much the other way around even though I also love python and think it’s amazing. Main reason: The type system is great and there are so many things that I can express/enforce using it that are missing for me in python even using typing libraries.
Yes, there is a large crew of FP fans around scala that can be obnoxious at times, but they have also brought a lot of good stuff around. The way I see it: You need groups that “overshoot” and then settle on the middle ground. Compromise...
I use FP when it’s not too complicated, but stay away from the larger monad systems that are hard to explain to newcomers (effects/IO/Kleisli etc) because I honestly feel like it’s too much. Let me just run my debug logger when I want to... (yes I know that’s not what it’s about)
I probably fall in the category of using scala as the (way) better Java with sprinkles of FP and non-mutable data objects everywhere. I really like the authors style (his work is awesome in general and I point to your posts a lot for our juniors, thank you for your contributions if you read this)
It has its flaws, just like any other language, but it’s also incredibly expressive and fast (enough) for the backend and data engineering that we do
Your point about the FP crew being seeming obnoxious sometimes is true. The style itself can be great, I use IO daily and the monadic style is the glue that holds our apps together. The difference with my team, or approaches that work generally, is that we don't go on and on about these abstractions. I barely mention the 'M' word and just talk about chaining things together. Once that is appreciated then IO isn't that hard to get a basic idea of either. We talk a bit about lazy evaluation but I try not to freak everyone out by mentioning purity, higher kinder types and functors every second breath. It's enough to gain a working intuition for these things without bringing theory to the foreground. That can come later if / when ppl are interested.
I guess we also choose our style and abstractions carefully and only use things when we can justify it as a team. If someone raised a PR full of novel concepts that we hadn't grokked as a team, it might well get rejected. For example we started using monad transformers a while ago only after the concept and benefits in our code was explained and bought into by the team. This doesn't just apply to Scala but is especially important when using it. Reach consensus with your team about the style and evolve it together.
I get the feeling that other language cultures, maybe Rust being one, are good at just using FP, without talking endlessly about it.
My favorite thing about the language is its flexibility, if i want to have pure imperative java style code i can do it. I dont think everyone should blame it just because there are so many haskell fans. I think ZIO is a good sign
Yeah the extreme FP stuff works for some people, but not others, and that subcommunity has traditionally been very loud. I've been pushing hard on using Scala in a more hybrid way over the years, first with my open source libraries and then with my book Hands-on Scala. I think I've had some success in pushing this.
There's definitely been a shift in the community in this direction. While the hardcore-FP folks are still around, as are the hardcore-Reactive folks, there are now many others using Scala in this more simple, simplistic way to good effect. Scala is a big tent and every
subcommunity can find things they like even if they don't always agree
In my view though, Kotlin is just a much better version of that. But of course if you have lots of scala investment already, it makes more sense to do it within scala itself.
It comes with the same easy Java interop, but is a much smaller simpler language, while in my view managing to include essentially all of the most useful ergonomic improvements (over Java) that Scala does, but with essentially none of the more complex baggage.
Yes, there is a large crew of FP fans around scala that can be obnoxious at times, but they have also brought a lot of good stuff around. The way I see it: You need groups that “overshoot” and then settle on the middle ground. Compromise...
I use FP when it’s not too complicated, but stay away from the larger monad systems that are hard to explain to newcomers (effects/IO/Kleisli etc) because I honestly feel like it’s too much. Let me just run my debug logger when I want to... (yes I know that’s not what it’s about)
I probably fall in the category of using scala as the (way) better Java with sprinkles of FP and non-mutable data objects everywhere. I really like the authors style (his work is awesome in general and I point to your posts a lot for our juniors, thank you for your contributions if you read this)
It has its flaws, just like any other language, but it’s also incredibly expressive and fast (enough) for the backend and data engineering that we do