Hi, there everyone!
This is the last video of a series of 3 about variance in Kotlin. In this one, I'm discussing Contravariance in a nutshell. This third installment is composed of two shorts because it was quite difficult for me to tell all the basics in one short video. This is short b. It complements the previous short a. As a more in-depth understanding of how variances work, there will be a follow-up long video to explain in more detail how it all works. This video had to be made long because of some video and sound restrictions I came across.
---
All videos of this episode package:
- What is covariance? Explained with coffee cups! (JES12E3/4) - https://www.youtube.com/watch?v=P1QYlb6a74w
- What is covariance? Explained with coffee cups! (JES12E2/4) - https://www.youtube.com/watch?v=3MjFRQmWbWs
- What is covariance? Explained with coffee cups! (JES12E1/4) - https://www.youtube.com/watch?v=Ry9SFiY4vq4
---
Chapters:
00:00 Introduction
00:06 Contravariance Theory
00:17 Why do we call it contravariance?
00:44 The barista example
01:33 Conclusion
---
Please find the source code for this in the:
- Kotlin Crums 4 Variance - https://github.com/jesperancinha/jeorg-kotlin-test-drives/tree/main/jeorg-kotlin-crums/jeorg-kotlin-crums-4-variance
---
And while you are reading this, if you are interested in knowing about data classes in Kotlin and on the other hand about records and Lombok in Java, please have a look at almost all my repos to see the differences and learn how and where to use them, but for now, I hope you enjoy this video!
My best repos to learn about records are:
- JEOrg Spring Test Drives - https://github.com/jesperancinha/jeorg-spring-test-drives
- JEOrg Spring Master Test Drives - https://github.com/jesperancinha/jeorg-spring-master-test-drives
And since most of my repos are in Kotlin and can give one example:
- Concert Demos Root on GitHub - https://github.com/jesperancinha/concert-demos-root
---
All my work and personal interests are discoverable on different sites:
- JESC (João Esperancinha Software Creations) - https://www.youtube.com/@joaoesperancinha
- JACE (João Arts & Crafts Esperancinha)- https://www.youtube.com/@joaoesperancinhacJACE
- JECI (João Esperancinha Cooking Ideas) https://www.youtube.com/@joaoesperancinhaci
- JEBotanical (João Esperancinha Botanical)https://www.youtube.com/@joaoesperancinhaBotanical
- My Website - https://joaofilipesabinoesperancinha.nl/
- Credly - https://www.credly.com/users/joao-esperancinha/badges
- Pinterest - https://nl.pinterest.com/jesperancinha/
- Instagram - https://www.instagram.com/joaofisaes/
- Facebook - https://www.facebook.com/joaofisaes/
- Spotify - https://open.spotify.com/user/jlnozkcomrxgsaip7yvffpqqm