Skip to content
0:00 / 0:00

#zio#variance#covariance

Part 3 - ZIO[_, Error, _] & Variance - Getting Started with #ZIO in #Scala3

DevInsideYou

13K subscribers • 51 videos on Hallway

YouTube

Intermediate. Assumes working knowledge.

5K views5 years ago1 recommendation

Programming languagesSoftware designScalaLanguage design and type systems

How to implement the error channel in a custom ZIO effect type while exploring covariance, contravariance, and type inference in Scala 3.

In this video we will continue implementing our own version of ZIO. This video focuses on the second parameter slot (the error channel) of ZIO. The code is here: github.com/DevInsideYou/zionutshell Table of Contents: Intro Total functions Inserting the error channel into our ZIO Variance Covariance Contravariance ZIO.effect Type inference catchAll - the flatMap for the error channel fold mapError - the map for the error channel Website: devinsideyou.com Patreon: patreon.devinsideyou.com Discord: discord.devinsideyou.com Telegram: telegram.devinsideyou.com Twitter: twitter.devinsideyou.com GitHub: github.devinsideyou.com LBRY: lbry.devinsideyou.com Install scripts: install.devinsideyou.com Giter8 templates: g8.devinsideyou.com Spotify concentration playlist: code.radio.devinsideyou.com Cheers and Happy Coding! #scala #tutorial

Why it's here

1 person recommends this

Moments people linked to

u/agilesteelin r/scala • Recommends

Part 3 - ZIO_, Error, _ & Variance - Getting Started with ZIO in Scala3

u/BalmungSanin r/scala • Mentions

On “Confused by Generic types”

…s that at some point in the runtime, you would pass an `EnglishRockSong` to the `writeSong` method of a `GermanRockSongWriter` which is expecting a `GermanRockSong` and then it would crash with a `ClassCastException`; thankfully this will never happen because the compiler will not let us compile unsafe code. To learn more about variance check: + link to this video + link to this video + https://stackoverflow.com/questions/68234835/covariant-type-a-accepted-in-contravariant-position-of-function-argument-a-b/68236182#68236182 + link to this video Also, feel free to ask any question here or in the chat channels :) Happy coding!…
48View on Reddit