Re:Multi-Paradigm Languages
by AzzieElbab on Tuesday November 24, 2020 @06:45AM
(#25197565)
IMHO scala projects require company’s wide enforced coding styles. Otherwise one group will try writing it as Haskell while the other will run off with Java crap that is simply not needed in scala
[ Parent
| on HN ]
Re:Multi-Paradigm Languages
by valenterry on Tuesday November 24, 2020 @06:56AM
(#25197643)
That's right. And actually, once you stick to one of them, Scala is an amazing and productive language, better than Kotlin and Java are and will probably ever be. But mixing the two styles does not work out.
I agree. Vanilla OO/functional Scala, focused on immutability and functional idioms, but without effect systems and type classes, can be a really beautiful, simple, expressive, highly productive way to develop software. I'm neck deep in FP Scala now (the cats ecosystem with cats-effect) and hoping I eventually come to feel the same way about it.
I'm very sad about the Java OO extremists and the Scala functional extremists finding common cause in denying the possibility of moderate, limited use of Scala's power. Programming that way is head and shoulders above Java, and I've yet to see FP Scala match it for productivity (again, hoping and working, so fingers crossed.)
Re:Multi-Paradigm Languages
by valenterry on Tuesday November 24, 2020 @09:17AM
(#25198607)
> I'm neck deep in FP Scala now (the cats ecosystem with cats-effect) and hoping I eventually come to feel the same way about it.
I think if you want to experience a similar feeling, you should look at ZIO instead.
It makes things so much easier compared to cats-effect by being less abstract and more direct, but still works with the cats type-classes. Really recommended for the functional side of Scala.
We're thinking about ZIO. It looks really nice, but we have applications built on a lot of different frameworks already, and I'm worried about how we can rein in our tendency to always add more technologies and never reduce and consolidate.
Re:Multi-Paradigm Languages
by valenterry on Wednesday November 25, 2020 @06:07AM
(#25208000)
Yeah, I can see that. The good thing is that you can replace cats.effect with ZIO quite easy - not so much the other way around once you use ZIO specific features though. It's a tough decision...
Re:Multi-Paradigm Languages
by AzzieElbab on Tuesday November 24, 2020 @03:01PM
(#25202418)
I agree but it goes both ways. Bolting some over-engineered and mostly unnecessary Java pattern or framework/di on top of scala does not simplify things either. Why lifhtbend had to make guice standard in their play framework is beyond me