I have read several explanations about the variances subject and never felt like I fully understood it. This video is the best explanation I found, now I feel very comfortable with it. Thanks a lot and please make more videos like this :-)
Taking my fedora off to honor the humanity-changing great feat of Laika the space dog 😔🎩 You will forever be in our hearts, comrade Laika ❤ Let's honor her memory by studying hard, so that the people of the world can finally tame the boundless nature of outer space... With the help of Scala, obviously.
Finally, someone could make me understand this thing... BTW I came here without any knowledge of Scala (my background is from Kotlin lol). The way that you explained it is so good that I could understand it even with examples in a language that I had never seeing before. Thank you so much.
2 роки тому+1
This is the best explanation of this concept I have seen till now! Thanks, Daniel!
An interesting natural example where variance and contravariance exist, even if doesn't seem logical: human blood types. In terms of blood cell compatibility, O is the universal donor (provides for every other), while AB is the universal receiver. In terms of plasma is the other way around: AB is the universal donor, while O is the universal receiver
wow, underrated channel, i remember drawing a lot of diagrams explaining contravariance in stackoverflow once so i thought i understood it but you have an incredibly effective way of distilling information. i'm going to watch all your videos just to see how you explain it ==)
Awesome video man, quite simple, after some research I was almost at the starting point to understand this, your approach rocks, just one complaint, Hachi was not a lucky dog, he is a legend, 👏
The explanation makes perfect sense but couldn’t you just as easily have defined a Vet that supports a method heal of type animal? What benefit does specifying contra bring here? Covariant Vet[T
It's the same problem in OOP - why would you specifically need a Dog when you can program against the Animal interface? With contravariance, it's the same question, in reverse.
Great Videos, however... I would most definitely not call it "Lucky" or fortunate to be Lakia to die of asphyxiation and overheating... Also Hachi is an incredibly sad movie...
You definitely have a talent for explanation
Thank you1
I have read several explanations about the variances subject and never felt like I fully understood it.
This video is the best explanation I found, now I feel very comfortable with it.
Thanks a lot and please make more videos like this :-)
Brilliant, glad it clicked!
Taking my fedora off to honor the humanity-changing great feat of Laika the space dog 😔🎩
You will forever be in our hearts, comrade Laika ❤
Let's honor her memory by studying hard, so that the people of the world can finally tame the boundless nature of outer space... With the help of Scala, obviously.
The best explanation of contravariance I’ve seen.
That's my goal, glad it helped!
Slowly coming to terms with this concept but the consumes vs. produces rule of thumb is the best summary I've seen so far of when to apply variance. 👍
Glad it clicked!
Finally, someone could make me understand this thing... BTW I came here without any knowledge of Scala (my background is from Kotlin lol). The way that you explained it is so good that I could understand it even with examples in a language that I had never seeing before. Thank you so much.
This is the best explanation of this concept I have seen till now! Thanks, Daniel!
An interesting natural example where variance and contravariance exist, even if doesn't seem logical: human blood types.
In terms of blood cell compatibility, O is the universal donor (provides for every other), while AB is the universal receiver.
In terms of plasma is the other way around: AB is the universal donor, while O is the universal receiver
Nice example!
wow, underrated channel, i remember drawing a lot of diagrams explaining contravariance in stackoverflow once so i thought i understood it but you have an incredibly effective way of distilling information. i'm going to watch all your videos just to see how you explain it ==)
Really really good explanation. It feels quite intuitive now
Best Scala tutorials evere, I'm so happy I found your channe. Perfect 💯
I liked your examples a lot
What a wonderful video, this subject was so vague for me, thank you !
The best co- vs contravariance explanation in the world
Thanks!
Awesome video man, quite simple, after some research I was almost at the starting point to understand this, your approach rocks, just one complaint, Hachi was not a lucky dog, he is a legend, 👏
I've benn waiting for this video!
That was really helpful, thanks man!
so awesomely explained I finally got it. Thank you!
Awesome!
As always very well explained.
Thank you.
I read effective java to thousand articles .Contra-variance remained a puzzle.I think today it sinked in.Thanks.
That's the goal!
The explanation makes perfect sense but couldn’t you just as easily have defined a Vet that supports a method heal of type animal? What benefit does specifying contra bring here? Covariant Vet[T
No, because each T is different. Variance is all about the ability to replace a Vet of a type, with a Vet of another type.
Thanks a lot :). I learnt something completely new today
That's my goal!
A god-send video!
Glad to hear it's useful!
Wonderful stuff
Thanks for the video! Great explanation
Glad it helped!
Excellent explanation!
Thank you very much, it's very valuable
glad to hear it!
Very helpful, thankyou so much!
Glad it helped!
I guess no one in UA-cam will explain as you do🤩🤩
Massive thanks!
could you give an example why would one need
vet: Vet[Dog] and not vet: Vet[Animal]?
It's the same problem in OOP - why would you specifically need a Dog when you can program against the Animal interface?
With contravariance, it's the same question, in reverse.
amazing
really best explanation
Glad you liked it!
Thank you sir :)
Glad it helped!
God bless you :)
Thank you!
The link no longer works.
Fixed!
ua-cam.com/video/b1ftkK1zhxI/v-deo.html maybe better to clarify that the type List is COVARIANT (and not the type Animal)
I wish I could give more likes
Great Videos,
however... I would most definitely not call it "Lucky" or fortunate to be Lakia to die of asphyxiation and overheating... Also Hachi is an incredibly sad movie...
incredible thank you
amazing