Cats vs ZIO

  Рет қаралды 9,446

DevInsideYou

DevInsideYou

Күн бұрын

Пікірлер
@DevInsideYou
@DevInsideYou 2 жыл бұрын
Table of Contents: 00:00 Intro 02:42 "The Big Rewrite" is not worth the cost 04:21 Tagless-Final is not pulling it's weight 08:50 Defensive Programming 11:04 Library vs Framework
@SickAsSieves
@SickAsSieves 2 жыл бұрын
I don't think this has been said enough: there's absolutely no requirement on using tagless final if you choose cats-effect. I've been using CE for 4 years and have 1 tagless final algebra (in a non-tf codebase) where I use different effects. A lot of people (even cats/cats-effect maintainers) won't recommend TF as a starting point.
@xbmarx
@xbmarx 2 жыл бұрын
I do agree ZIO is gaining ground in the industry. I've been working with some recruiters (just curiously seeing the job market) and I'm pretty surprised by how much more demand there seems to be from even a year ago.
@marcello4258
@marcello4258 Жыл бұрын
Haven’t seen any job offering requiring Scala without mentioning ZIO
@hectordoyle4718
@hectordoyle4718 2 жыл бұрын
love you, Vlad thank you for the great video
@petacardi
@petacardi 6 ай бұрын
8:33 The entire point of the problem in that example code can be avoided with a unit test. Still not find the relation with taggles final.
@DevInsideYou
@DevInsideYou 6 ай бұрын
The point I was trying to make is that TF (as everything else) has a cost. You are precisely right. In this particular scenario a unit test would have been a better choice and so I was arguing that TF is a worse choice most of the time. The relationship between my example and TF is the fact that both of them would have tried to solve the problem with more types rather than something as simple as a unit test or some other tool.
@SeriousWorm
@SeriousWorm 2 жыл бұрын
Great video, it was very helpful. I've been developing with Scala since 2011 but have just started looking at FP libraries/frameworks, and I agree that ZIO really does seem like a good choice to go forward with on new projects. Thank you.
@abc_cba
@abc_cba 2 жыл бұрын
I am sorry but what was your finale point in picking between the two ?
@DevInsideYou
@DevInsideYou 2 жыл бұрын
I am not sure if you are trolling, but the answer to your question is ZIO.
@abc_cba
@abc_cba 2 жыл бұрын
@@DevInsideYou what the hell, no ! I'm not trolling, I'm your fan.
@DevInsideYou
@DevInsideYou 2 жыл бұрын
Cool cool. The answer is still ZIO. :)
@danielstoica3633
@danielstoica3633 2 жыл бұрын
Thank you for the video, Vlad ! :)
@LongLiveEnduro
@LongLiveEnduro 2 жыл бұрын
thanks Vlad, very good video 👌
@amislouma
@amislouma 2 жыл бұрын
Thank you for “not it depends”
@szotsmiklos8549
@szotsmiklos8549 2 жыл бұрын
I also never understood why ce == tl. It's just as good of an effect lib as zio (1) is/was without needing to use tl. You say it yourself "we don't need n versions of each lib", I agree and before zio we already had a lot of well established libs for all things that matter. Now thanks to zio all of those libs doubled in number but quality is not on par with previous libs. The reason I'm uneasy with the zio community is because of it being a fork and not an extension to scala libs. Great video though, agree with your points.
@DevInsideYou
@DevInsideYou 2 жыл бұрын
True, this happens often. Quality is not on par is debatable though. Some things are better in ZIO others are not as mature.
@unclebob418
@unclebob418 2 жыл бұрын
Perhaps you should be uncomfortable with cats - after all, it's a fork, not an extension of scalaz. Forks aren't necessarily a bad thing. Look at all the innovation that has happened as a result. Cats and ZIO are both much better off as a result thanks to genuine innovation in both libraries.
@JorgeAdrianoBrancoAires
@JorgeAdrianoBrancoAires 2 жыл бұрын
A point you did not address is that ZIO is about IO. How does ZIO help me when I want to do non-IO functional programming? How do I sequence a List of Either's? How do I stack an Option and an Either? Also it doesn't offer an equivalent to the collection of concrete data types you find in Cats, for e.g. NonEmptyList, Validated, Ior. Currently, there appears to be ZIO-Prelude to address both of these points to some extent, but in its early beginnings.
@DevInsideYou
@DevInsideYou 2 жыл бұрын
The video is rather about cats-effect (or in fact the tagless-final technique). I myself will keep combining cats-core with ZIO since cats-core is also a utility library. In fact I made a video about the fact that it's a utility library long time ago kzbin.info/www/bejne/eIHIqXirad55jMU
@AO-xe3dl
@AO-xe3dl 2 жыл бұрын
Have you ever heard of zio-prelude?
@JorgeAdrianoBrancoAires
@JorgeAdrianoBrancoAires 2 жыл бұрын
@@DevInsideYou thank you for you answer. I need to re-watch that one video, it's been a while. I do the same, ZIO+Cats-core. But how clean is it? That's the question. The ZIO type is meant to avoid monad transformers, and instead utilize what de goes calls "effect rotation" (see One Monad to Rule Them All), but use cats-core based functional programming and you're back to transformers. ZIO is meant to, and I quote introduce "no jargon, no type classes, no implicits, no higher-kinded types, and no category theory", all of which come with cats-core. Are devs going to be learning Foldable, Traversable and Apply anyway?
@JorgeAdrianoBrancoAires
@JorgeAdrianoBrancoAires 2 жыл бұрын
@@AO-xe3dl Yes, I misnamed it zio-core in my original comment above, my bad, will fix it. I believe that is in its early beginnings though.
@ardfard101
@ardfard101 2 жыл бұрын
​@@JorgeAdrianoBrancoAires I think how you stack your concrete Monad is orthogonal to learning about Foldable, Traversable, Apply etc. ZIO type is not based on traditional Monad Transformer but it's still conform/implements to type classes laws so all the Cats utility functions that depends on the typeclass laws still works anyway.
@sagnumb
@sagnumb 2 жыл бұрын
keep up the good work mate. Scala 4 life.
@SJ-ds8lp
@SJ-ds8lp 2 жыл бұрын
In the end, I hope both ecosystems bash each other less and learn from each other, instead of quickly dismissing ideas from one or other.
@heartly4u
@heartly4u 2 жыл бұрын
@vlad any plans on making a beginners video for FS2 and streaming.. Mostly interested in learning real life scenarios in this. Apologies for being derailed of the topic...but just thought of asking..
@DevInsideYou
@DevInsideYou 2 жыл бұрын
I always wanted to make a video about FS2 but I don't have the time or the need to use it. I think Daniel made one recently you might wanna check it out kzbin.info/www/bejne/jnTTeKeXf8-ejLs
@PeatySpirit
@PeatySpirit 2 жыл бұрын
As I am currently looking into what library I should invest time and effort this is could not arrive at better time! Thx
@KamilKloch
@KamilKloch 2 жыл бұрын
Thank you for the video! How does ZIO Streams compare to a jewel like fs2? (Features, addons etc).
@DevInsideYou
@DevInsideYou 2 жыл бұрын
fs2 is a very mature and battle-tested library. It will take quite some time for ZIO Streams to catch up and prove itself.
@DinoFancellu
@DinoFancellu 2 жыл бұрын
Really good video. I like when people are prepared to have an opinion and state it without shame. Thanks
@mmuschalik
@mmuschalik 2 жыл бұрын
Agree with what you said. Keep it up.
@miloventimiglia8547
@miloventimiglia8547 2 жыл бұрын
I am not familiar with ZIO yet but the remarks you make about "which stack shall I learn?", and "too many things that do the same" are definitely accurate. I guess that is the reason why large corporations prefer Java/Springboot; one stack rules them all! Not to extend it makes operations cheaper and finding experienced developers easier.
@petacardi
@petacardi 6 ай бұрын
But why are you treating cats and tagless final as the same thing? I have been working with Cats as an effect system without any taggles algebra. It is fine to straight depend on the entire IO.
@DevInsideYou
@DevInsideYou 6 ай бұрын
You are right. I should have made the distinction more clear. Years after I made this video I'd argue though that even if you use cats-effect without TF you are likely to use the rest of the typelevel ecosystem which is written in TF so you'll at least have the cognitive overhead. Furthermore at the time the idea of having IO in the business logic was frowned upon in the typelevel ecosystem whereas it was embraced in ZIO. Again all that said I should have made the distinction more clear.
@petacardi
@petacardi 6 ай бұрын
​@@DevInsideYou That's true. I have also worked in projects fully embracing TF and it was though to get into them. That may be why I am so sensitive about using the IO everywhere haha. Thanks for answering!
@jonathanwinandy
@jonathanwinandy 2 жыл бұрын
Can we like the video twice? Interesting comments on your video ( I will try the CE without TF, but not sure if I can stand it.... )
@jonathanwinandy
@jonathanwinandy 2 жыл бұрын
Already doing some TF in ... 2012 with scalaz. That doesn't make me younger nor wiser. I am glad ZIO explored another path, that seems more manageable for the day-to-day code.
@ClewertonCoelho
@ClewertonCoelho 2 жыл бұрын
Diversity is good, not bad. You can take whatever fit your client's needs and the team is productive with. There's no reason for "a solution to rule them all".
@DevInsideYou
@DevInsideYou 2 жыл бұрын
I agree. Diversity is good and now that we have a choice I made mine.
@Somatik
@Somatik 2 жыл бұрын
Playframework was also something we all thought would never go away but progress stopped. Akka/Alpakka is in a similar situation. These days I try to avoid libraries that have both a Scala and Java api. Staying compatible with both is not like 1 + 1 = 2 but more 1 + 1 = 3. Creating a PR for eg Alpakka is not something I look forward to.
@SJ-ds8lp
@SJ-ds8lp 2 жыл бұрын
I am using CE, because of the mature ecosystem: fs2 and a handful of libraries, but ZIO does look more and more attractive exactly for the reasons you mentioned. As a one man show, it's hard to change now (15K lines 😛). But hopefully, there is enough bridge between the 2 that one can interop with the other seamlessly. The thing I worry about is the division between 2 that forces people to pick camps damaging the userbase.
All Rust string types explained
22:13
Let's Get Rusty
Рет қаралды 191 М.
ZLayers in ZIO 2.0 are a totally different BEAST!
29:36
DevInsideYou
Рет қаралды 7 М.
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
How Babolat Made the Greatest PURE AERO Yet
16:48
TennCom
Рет қаралды 54 М.
What is ZIO? (The Scala programming language “ZIO 2” library)
26:32
Alvin Alexander
Рет қаралды 1,1 М.
Don't Use Websockets (Until You Try This…)
6:46
Code With Ryan
Рет қаралды 327 М.
THE LINE is Growing FAST! Construction Update 2024
12:47
Looking 4
Рет қаралды 2,2 МЛН
Functional Programming Crash Course for Scala Beginners
1:27:10
DevInsideYou
Рет қаралды 16 М.
Why I keep choosing ZIO!
9:46
DevInsideYou
Рет қаралды 4,5 М.
10+ Scala Concepts You Need to Know
16:50
DevInsideYou
Рет қаралды 5 М.
Build a Large Language Model AI Chatbot (Part 2)
6:03
Prof. Reza
Рет қаралды 24
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН