If you ever defined generic in Kotlin, you’ll notice many a times, it would propose to use the in or out keyword to define the generic. It puzzles me at a start on when which is used, and for what. Formally, this is a way to define contravariance and covariant.
Read moreWhat is Kotlin most used for?
Kotlin can be used for any kind of development, be it server-side, client-side web and Android . With Kotlin/Native currently in the works, support for other platforms such as embedded systems, macOS and iOS is coming.
Read moreWhat does in do in Kotlin?
It turns out the Kotlin in keyword is shorthand for the operator contains . It’s not an interface or a type, just the operator. If we wanted to make a custom type to check if a value is in our type, all we need to do is add the operator contains() .18 Şub 2020
Read more